Database Structure:
// meta data etc. not supported yet...
create table translations ( id int(11) auto_increment not null primary key, string_id int(11), page varchar(128), lang varchar(10), translation text ); alter table translations add index page (page); alter table translations add index lang (lang); alter table translations add index string_id (string_id);
then just run the dataobjects createtables script.
This storage driver can use all databases which are supported by the PEAR DB abstraction layer to fetch data.
Translation2_Container_dataobjectsimple
Таблица 30-1. Classes that extend Translation2_Container_dataobjectsimple
| Class | Summary |
|---|---|
| Translation2_Admin_Container_dataobjectsimple | Storage driver for storing/fetching data to/from a database |
Translation2_Container_dataobjectsimple Inherited Methods
Таблица 30-2. Inherited from Translation2_Container
| Method Name | Summary |
|---|---|
| Constructor Translation2_Container::Translation2_Container() | Constructor |
| Translation2_Container::fetchLangs() | Fetch the available langs if they're not cached yet. |
| Translation2_Container::getLang() | Gets the current lang |
| Translation2_Container::getLangData() | Gets the array data for the lang |
| Translation2_Container::getLangs() | Gets the available languages |
| Translation2_Container::getOne() | Get a single item from the container, without caching the whole page Containers should implement this method. |
| Translation2_Container::getPage() | Returns an array of the strings in the selected page Containers should implement this method. |
| Translation2_Container::getStringID() | Get the stringID for the given string |
| Translation2_Container::raiseError() | Trigger a PEAR error |
| Translation2_Container::setLang() | Sets the current lang |
| Пред. | Начало | След. |
| Translation2_Container::setLang() | Уровень выше | constructor Translation2_Container_dataobjectsimple::Translation2_Container_dataobjectsimple() |
HIVE: All information for read only. Please respect copyright! |