Translating the Tiki interface | |
This page is a kind of tutorial, that needs needs review. Moreover, some more screenshots would be nice... See related page: i18n Admin. See also * Interactive Translation of Tiki Interface |
1.1. Status of the translations | |
1.2. Translate through i18n.tiki.org | |
One of the easiest ways to contribute to the translations of the Tiki interface is registering at i18n.tiki.org and use the interactive translation feature to get most of the strings available translated into your known languages. That ususally means commiting changes to the next development version of Tiki (since these changes will be merged into the trunk branch of development). See: http://i18n.tiki.org |
1.3. Translate editing the language.* files on disk and use svn | |
For example, to improve the translation into Catalan, it is necessary to modify the content of the file: Copy to clipboard
And since tiki6.1, you can edit the strings at: Copy to clipboard
These .php (and .js) file contains a bunch of lines with pieces of sentences or words ("strings of text") like: Code Copy to clipboard
Comments start with "// ", but some lines that have not been translated yet also starts with those characters: Code Copy to clipboard
When a line have been correctly translated, you can delete the two initial slashes and the blank which follows to let Tiki use the translation: Code Copy to clipboard
Once you have improved or fixed the translations in the language.php file, you can overwrite the original file on the server (/lang/ca/language.php). It is highly recommended to make a backup copy of the original file; you can rename it to language.php.old. Done the above, to load the translations to the server, login as administrator and then execute the following request on the browser's address bar: Code Copy to clipboard
Finally, to apply the new translation in the current instance of Tiki, you must clear the system cache.You can then continue translating and improving translations by repeating the process as frequently as desired. If you want to share the translation improvements for a language, you can share the language.php file in the Tiki Git repository (the central repository of code; keep reading, further down ). This general process has some variants, depending on how to edit the file that contains the text strings. Shortly, you can modify:
Be careful that the language.php is a php parseable file. So you must not change some lines at the top Code Copy to clipboard
|
1.3.1. Character sets | |
The file must be saved in utf8 encoding. |
1.3.2. How to contribute your translation improvements to Tiki | |
In order to have your translation improvements contributed to Tiki code (so that they are included in new releases, etc), you have to commit then to the branch equivalent to your tiki installation. Or to trunk branch. For more information about branches and how to commit, check: For more information on how to merge strings translated from trunk into previous branches, see: |
1.3.3. Reference sites | |
|
1.3.4. PHP/Smarty translations | |
1.3.4.1. Others: Convert to .PO fileAlso there is the option to convert the language.php to a .po file, in order to take advantage of other tools which support the translation of PO files using the GNU Gettext. This system is not explained here. You can find more information at: 1.3.4.2. Translation through Tiki interface (database)You need to enable the option: "Admin > i18n (Internationalization) > Use database for translation", and afterwards, clean caches ("Admin > System Administration" > ./templates_c/ Empty). Then, the link is enabled in the main application menu: Admin > Edit languages, that will bring to an url like: Copy to clipboard
Then it is necessary to create the translation into the database, for the Catalan language in this example, and tell Tiki to import the text strings already translated at the file language.php. This is performed in some short steps:
To edit the text strings, then you need to: | ![]() At the end, it is necessary to take this generated file language.php (in ./lang/ca/language.php) and upload it (commit changes) the central repository of code of Tiki at sourceforge.net, through SVN, in case you want that other people can benefit from your improvements (desirable! 😉). |
1.3.5. Custom translations | |
It is possible to customize your strings translation without changing the lang/your_language/language.php file. It is very convenient when you upgrade or sync with the latest. You can keep your translations. Copy to clipboard
In Tiki 9.x there is this on the last line: Copy to clipboard
A file example is located at Copy to clipboard
Note : Be aware that any file like "language_*.php" will be also included in the translation. When you are on a multitiki, you can have a 1.3.5.1. Custom JavaScript TranslationsSome text can only be translated with JavaScript in the client browser. To do this add a file Copy to clipboard
➡️ Be sure the file is saved with UTF-8 encoding. If the file is not saved with UTF-8 encoding, a fatal error may result and no Tiki pages will display. Terms/phrases in the custom file will be used in place of the same terms/phrases in the regular language file. (Not just anything can be added to these files, of course. They must be strings specified for translation in the templates, etc.) 1.3.5.2. Custom JavaScript Translations Without a FileIf you cannot access the file system you can add similar code into the Custom JavaScript preference on the Look & Feel control panel. Copy to clipboard
|
1.4. More Information | |
Alias names for this page
Translating Tiki interface | Translating interface | Interface Translations |