WIKINDX ~ Languages

The instructions below for a manual coding of the localization should be ignored if you are using the localization plug-in module. Using the module is the preferred method and it may be downloaded from the WIKINDX sourceforge site.

This file and currently used languages and their extensions can be found at the WIKINDX sourceforge documents section.

WIKINDX provides multi-language support for all browser output that does not originate from the database. This includes all labels for form elements, hint messages, page headings, errors and menu/submenu items.

Each of the classes in the languages/xx/ folder contain internally used methods that have associative arrays (translation arrays) that are duplicated in each method where the only difference is the arrays' value string depending on the translation. The array name and keys should remain in English and be the same across all the class's methods.

Any occurrence of the three-character code '###' anywhere in the translation arrays' value strings is replaced by an optional string passed via the class's text() method. Depending on the language requirements, '###' can be positioned where you want. WIKINDX will add a space before it - if you want a space after it, you need to add that yourself.

Further help is supplied in comments in the English language files.

To set up a new language:
1/ copy the files in languages/en/ to a new folder in languages/. Please ensure that the name of this new folder is not already taken by another language by checking the documentation at Sourceforge.
2/ in each file, change the '_xx' extension of the class name and constructor name to match the name of the folder you have created under languages/.
3/ translate the values of each array or appropriate text in each of the new files. Do not touch the keys of arrays!
4/ create a file languages/xx/description.txt and add a one-line description that will be displayed to users when they select a language in their preferences.
5/ if you wish to make your translation available to other WIKINDX users, please tar and zip the xx/ folder and contact the WIKINDX admins via sourceforge who will be happy to add your creation to the downloads list.
6/ all language files should be encoded as UTF-8. If you're unable to do this, the WIKINDX developers will be happy to do this for you.

For example, if you wish to supply a Klingon translation, create a new folder languages/kg/ (having checked it's not already in use) and copy the files in languages/en/ to that new folder. Change the extension of the class and constructor names in your copied files to match the new folder name (e.g. ABOUT_en becomes ABOUT_kg). Translate appropriately. In languages/kg/description.txt, add one line with the text Klingon.

Finally, tar and zip your new folder so that the tar file's contents look like:

	kg/description.txt
	kg/ABOUT.php
	kg/MESSAGES.php
	etc.
and contact the WIKINDX admins via sourceforge to have your language pack listed for download.

Please note, with each WIKINDX update, there are likely to be changes and additions to the core English language pack. If a user is using another language pack and a message is not found, then the appropriate message from the English pack will be displayed. As coding progresses, amendments and additions to the English language pack will be posted to the WIKINDX sourceforge documentation section for you to translate and update accordingly.

You can temporarily disable a language by renaming that language's description.txt file (e.g. to description.txt~). It is not advised to remove or disable the English language files.

CONSTANTS.php is used to handle numeric conversions and conversions to month names. This should be reasonably straightforward to translate but the cardinal to ordinal conversion (e.g. 10 -> 10th) may require a little PHP programming depending on your language. It should be clear what to do from the code in the English language CONSTANTS.php.

WIKINDX home      WIKINDX usage      WIKINDX classes