History: Interface translation (old)
Source of version: 24 (current)
Copy to clipboard
{BOX()} This page is superceded by ((Interface translation)). Anything here not there should be moved.{BOX} This page explains how to add custom translations to your Tiki. In short, you have to translate the strings you will find at the files under your ./lang/xx/ folder (being xx the two-letter code of your language): - ./lang/xx/language.php - ./lang/xx/language.js (since ((Tiki6)).1) ## How to customize your language file ### first way for tikiwiki<=1.9 : the 'easy' but slow one</h3> At this end of the lang/your_language/language.php file (your_language will be replaced by en,fr, en-uk....) Insert the following block just before ?> {img src=images/code.png}<br /> {CODE()} include('lang/your_language/customization.php'); if (!empty($customizationLang)) $lang= array_merge($lang, $customizationLang); {CODE} Create the file lang/your_language/customization.php like this {img src=images/code.png}<br /> {CODE()} "My new translation" ); ?> {CODE} Don't forget that the customization.php file must be utf8 encoded Don't forget to clean the cache (admin-> System admin) to have the translation updated This change the tikiwiki files - so be careful when you sync with the latest version Update also your ./lang/xx/language.js (available since ((Tiki6)).1) ### second way: Use the get_strings procedure. Create a file lang/your_language/language.patch (same format and encoding than above) and run get_strings.php?patch=y as an admin. Idem clear the cache. It is the fastest method but it is a litle more difficult ### third way for tikiwiki>=2.0 This method is the most simple. This can also be done to provide more appropriate or desired phrasing for a particular site and so may not be a translation issue per se. The file should have this name and path: *lang/your_language/custom.php* where "your_language" is the directory of the particular language that the alternative text is for. The file's content is a mini version of the normal language file, like (spaces added for php tags to display): An example exists in lang/fr/custom.php_example {CODE()} < ? php $lang_custom=Array( "Text in template" => "My new version of text", "###end###"=>"###end###"); $lang = $lang_custom + $lang; ? >{CODE} ➡️ 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.) --- {DIV(class=titlebar)}Related pages{DIV} - ((Interface translation)) - ((Interactive Translation)) - ((i18n|Internationalization)) - ((i18n Admin|Internationalization Admin)) - ((dev:Creating or maintaining translations)) {DIV(class=titlebar)}alias{DIV} - (alias(i18n User)) old page name