The CMS Joomla! supports many different languages in the frontend and backend applications already. Since Joomla! 1.5 the articles also do have a language parameter which allows to identify the language in which an article is written. However all other information such as section/category descriptions, module content or menu names do not have such a tag. This tag will the improve the possibilities of extensions to sort out language specific content. E.g. a RSS feed extension can present information for different languages or a content list can present the number of articles in one specific language without complex and time intensive database queries over a 'text' type filed.
The other element is the management of languages in general. Those languages are stored in a language file depending on their ISO codes. For references within the database it is hard to link to one of those files as the reference can't be matched to a database identifier.
- Add a new table _languages that stores the meta-information of all language files and relate those information to an database identifier
- Add a reference column 'langid' to all information tables (very similar to the number of tables the 'alias' column was added for 1.5)
3. TECHNICAL IMPLEMENTATION
3.1 New '_languages' table
The new language table can include all the information currently stored in the XML meta information of the language file. To simplify the language management I suggest to update the table when the language manager (extensions) is opened. Normally it is enough to check the language directory for the files and then update the content of the table. As the table stores only a reference to the file a dialog to modify those values is not required. The Translation Manager extension (http://extensions.joomla.org/component/ ... Itemid,35/
) already does this modification of XML files if it shall be implemented.
The Joom!Fish (http://www.joomfish.net
) project creates a similar table at the moment. We figured out that for our needs we additionally need a independent name for the language (might be translated) and a flag if the language is 'active' in the sense of the admin want's to allow a user to pick a certain language. This is not a real requirement more a nice to have for core Joomla! functionality as in the core the focus shall be on the reference for information nor on the management of multilingual sites.
3.2 Reference column for information tables
In all tables a new column 'langid' shall be implemented. The column can be "null" and shall refer to an existing language.id in _languages.
Together with adding the column to the tables it is suggest to include the current dropdown "languagelist" from the parameters implementation into the various dialogs as well, to allow the user to select his/her language. This applies to all frontend and backend dialogs in which those information are used.
The impact to the system is relatively small. As this is a new column that is not used yet but the language files already hold those information it is quite easy to add. The primary effort lies in the changes of dialogs to allow the language setting for the end user. Additional testing effort is only needed to verify the correct storing of the values.
The only definition that might be tricky is what happens if a language file is removed and with that a record in the language table is removed too. Are all references to this language been set to 'null' automatically or are they just become outdated?
No direct dependencies to external extensions.
The language meta-file description and importing logic as well as database table depend on each other.
Almost all other existing CMS include such a column in their information holding tables as well as a language table itself.
Public document: http://docs.google.com/Doc?id=dckd75hr_2d34dk4dc
your free multilingual solution for Joomla! 1.5 i - http://www.joomfish.net
- follow us on twitter @joomfish
Meet us at J and Beyond, 30.05 - 1.06.10, Wiesbaden, Germany - http://jandbeyond.org