Internationalization and languages
TikiWiki is an international project, supporting many languages. The default interface language in Tiki is currently English/en. We support any language, which may be encoded and displayed using the utf-8 encoding. We are always looking for translators.
Translations state
ISO code | English name | Name | Translator(s) | Completion (left = translated) | Url | Tiki Version | Details
|
|
bg | Bulgarian | Български | valio | | LanguageBulgarian | 1.9.x | -
|
|
ca | Catalan | Català | Xavier de Pedro | | LanguageCatalan | 1.8.4 | language.php attached here, (corrected)
|
|
cs | Czech | Český | Lukáš Mašek | | LanguageCzech | - | -
|
|
da | Danish | Dansk | Martin Geisler | - | - | - |
|
|
de | German | Deutsch | Oliver Hertel | | http://de.tikiwiki.org | - | -
|
|
el | Greek | Ελληνικά | az3rty takis | | LanguageGreek | - | -
|
|
en | English | English | All developers | | LanguageEnglish | - | Used as root language
|
|
en-uk | English British | English British | Damian | | LanguageEnglish | - | Used to translate american english to british english (e.g. color to colour)
|
|
eo | Esperanto | Esperanto | Steve Brewer | | LanguageEsperanto | - | -
|
|
es | Spanish | Español | Gustavo Muslera | | LanguageSpanish | - | -
|
|
eu | Basque | | Osoitz | | - | - | -
|
|
fa | Farsi | فارسی | Salem Derisavi | | - | - | Any help from native speakers is highly appreciated
|
|
fr | French | Français | Sylvie Greverend | | Traduction française, LanguageFrench | 1.8.x, 1.9.x | -
|
|
he | Hebrew | | Gil Shwartz | - | - | - | -
|
|
hu | Hungarian | Magyar | ang | | LanguageHungarian | 1.9.x, 1.10.x | -
|
|
id | Indonesian | Bahasa | Cahya T. Jatmiko, Ellyza D. Satriana | | - | 1.8 | -
|
|
it | Italian | Italiano | magius | | LanguageItalian | 1.9 rc3 | Original translation by Luca Marletta
|
|
ja | Japanese | | Kentaro Fukuchi, Rick Cogley | | LanguageJapanese | - | -
|
|
ko | Korean | 한국어 | gene203 | | LanguageKorean | 1.8.2, 1.9 | -
|
|
nl | Dutch | Nederlands | Patrick Van der Veken, Dimitri Smits | | - | 1.8.4 , v1.9.2rc | -
|
|
no | Norwegian | | GunnarRene, Lars Weydahl, Inge Solvoll | | - | - | -
|
|
pl | Polish | Polski | Andrzej | | LanguagePolish | 1.9.x | -
|
|
pt_BR | Brazilian Portuguese | Português (Brasil) | Renato Buiu, Luis Fagundes, Paulino Michelazzo | | - | 1.8 | PT-BR language 100% translated for > 1.8 versions
|
|
pt | Portuguese | Português | Sérgio Alves | | - | 1.7.2 | PT language translated for Tikiwiki Eta Carinae 1.7.2 version Download
|
|
ru | Russian | Русский | Dmitri Vassilenko | | LanguageRussian | 1.9.x | -
|
|
sk | Slovak | Slovenský | bluybrink | | LanguageSlovak | - | -
|
|
sr | Serbian | Српски | „Наше писмо“ | | Home Page | 1.9.x | Community-driven translation using Pootle, PO Convertor for TikiWiki and the [http://recnik.prevod.org |
GNOME Serbian Translation online dictionary]
sr-latn|Serbian Latin|Srpski|Daniyel Sili| - | - | - | Sligtly outdated. Once sr translation is complete, will be generated automatically
sv|Swedish| |
Jan Docekal|
| LanguageSwedish | 1.7.4, 1.8 rc2 | -
uk_UA|Ukrainian|Українська|
Dmytro Kovalov/Дмитро Ковальов |
| LanguageUkrainian | 1.8.x | Help from native speakers is highly appreciated.
zh_CN|Chinese Simplified| |Wells Wang| - |LanguageSimpChinese| - | folder: lang/cn
zh_TW|Chinese Traditional| |
Cecil Sheng,
Eric Yu|
|
LanguageTradChinese | 1.8 rc2|folder: lang/tw||
Tiki supports multiple languages and defines a mechanism to easily make the application available in other languages.
In the PHP scripts(.php files), all the text strings must be written as tra(“here goes the string”); which calls the tra function that translates the string.
In Smarty templates (.tpl files), you should use the Smarty block, for example Hello world{/tr}.
This is how you write text in Tiki to be language-aware.
Once you have modified Tiki the get_strings.php script can be used to scan all the .php and .tpl files in the application regenerating/changing the language files. New strings are added to language files untranslated.
Translator's documentation
Creating a new language
- Create a new directory under the “lang” directory. Please name it using the standard RFC 1766:
- 2-letter language code iso639 in lower case
- eventually "-" and a 2-letter country code ISO3166 in upper case
- For example, en = english, es = spanish,pt-BR = brazilian
- Before Tiki1.8 only 2 lettter directories were possible
- Give the adequate write permission to this directory (so that the web server can write).
- If you are working on a Tiki stable release, copy the language file (language.php) from a language you are familiar with or from the en directory in your directory.
- If you are working on a Tiki CVS version, run the script get_strings.php?lang=en as admin (change en with the 2-letter code of your language). This script collects all the strings of the Tiki code.
- Edit/translate the language.php file.
- Each text string looks like this:
- "last modification" => "last modification",
In Tiki1.8: some comments can be found after and the ligne can be commented (see below)
- Leave the text on the left as it is and insert your new text on the right.
- For example (in German),
- "last modification" => "letzte Änderung",
- Note that to get an umlaut over the A this German text uses the HTML code for an umlauted A: & A u m l ; .
- In French, "last modification" => "dernière modification",
- Note that the accents are utf-8 encoding
- If you find some Smarty variables (ex:{$nb}) or some some php variables(ex:%s) leave then in both part
- Tiki will automatically detect the new language once you save the language.php file.
Don't forget that the file needs to be in UTF-8 encoding to be displayed in Tiki. If you're using GNU Emacs to edit the translation, then you can choose the encoding with the command set-buffer-file-coding-system which is bound to 'C-x RET f' in the default setup.
A good editor choice can be also "gedit" (debian package too) that support UTF-8 encoding by default; or UniRed (GPL'd) for M$ Windows users. Another awesome Windows tool is WinMerge available from SourceForge (GPL'd too). To make it operate in UTF-8 mode by default - enter magic number 65001 in Edit->Options->Codepage.
When testing a new language, keep in mind that modules can be cached so they may not change their language unless you clear the cache. You'll find the option to clear cache in the Admin Modules screen. You also need to clear the Smarty cache (rm -rf templates_c/en) (change en with the 2 letters name of your language), this can be done with the Exterminator on the System Admin page.
Translating as PO files
If you are more familiar with GNU Gettext's PO files, you may be interested to try out the PO convertor for TikiWiki. The converter makes it easier to keep your translations up to date.
Anyway, if you have ever translated PO files, you will know why it is good.
Updating a language file with the last Tiki code: get_strings.php
To update a language file (language.php), you have to run the script get_strings.php as admin. The script adds to the file the untranslated strings.
- To update all the languages files: get_strings.php
- To update only one language (ex: en) : get_strings.php?lang=en
Then you can edit / translate the new strings.
- With Tiki1.7 , some comments are added by get_strings.php at the end of a language.php file.
- //perhaps not use : the string is no more found in the Tiki code by the script. Perhaps the string was really deleted, but perhaps the string is used through a variable , for example: $var{/tr}. As the string can still be usefull for a new translation, the line is kept . The translator can delete it. See the discussion about improving this point: UnusedWords
- //First new line: all the strings from this line are new strings and are not translated
- With Tiki1.8_: //perhaps not use and //First new line have been replaced by 3 groups
- //###start/end of unused strings
The strings are not any more found in tiki : because they have been modified in tiki or because it is the value of a variable. Actually getstrings is not able to distinguish both cases. When you are updating the translation, it is better to keep these lines (they can help to find the close string) but at release time, this section msut be deleted (except for the variable values translation)
- //###start/end of untranslated strings
Each untranslated strings is preceded with "//". As soon as, you have translated, you need to take the "//", otherwise the next get_strings.php will delete your translation. The reason that they are commeted is that oterwise running get_strings.php twice woudl put untranslated strings in this section into the possibly untranslated strings section (not very fun if there are a lot of changes and the translated language has simmilarities with english and/or you don't translate a lot of cumputer terms).
- //###start/end of possibly untranslated strings
This section is just for checking. It is all the strings that have both part identical.
- With Tiki1.8 , you can use the option close that proposes you as a comment a string already translated 'close' to the new one. : get_strings.php?lang=en&close=1
- //close "previously tranlated strings"=>"old translation". The algorithm used the levenshtein distance (the minimum letters number that differs)
- With Tiki1.8, you can use the option module. This option generates comments that describes in which .php and/or .tpl module(s) each string was found
- With Tiki1.8, you can use the option patch. This option looks for the file 'language.patch' in the same directory as the corresponding language.php and overrides any strings in language.php - good if a user does not agree with some translations or if only changes are sent to the maintaner
- With Tiki1.8, you can use the option comments. This option generate all comments (equal to close&module).
- With Tiki1.8, you can use the option spelling. This option generates a file spellcheck_me.txt that contains all the translated words (only once). You then have to use a traditional spellchecker (e.g. Open Office, Word or Emacs) on this file to find the errors and make the corrections in the original language.php. When running get_strings.php in spellcheck mode it is more convenient to not have the close and module options active (i.e. translate first and spellcheck later)
- With Tiki1.8, you can use the option groupwrite. This option makes the generated file langauge.php group writable, so that you can edit the file if you have group acces but not root acces. Just do not forget to run the script again without the parameter so that the write permission is reset.
- With Tiki1.8, the date and time formats can be translated in each language.php file. The admin settings will only overwrite the formats for the site language. 6 formats are added. The formats are explained in the strftime php manual :
- long date format, %A %d of %B, %Y
- short date format, %a %d of %b, %
- long time format, %H:%M:%S %Z
- short time format, %H:%M %Z
- long date&time format, %A %d of %B, %Y[%H:%M:%S %Z]
- short date&time format, %a %d of %b, %Y[%H:%M %Z]
Translation help
- It can be more easy to etablish a bilingual terminology before translating. A partial terminology can be found at TikiTermino.
- If you find some strings difficult to translate, please add your suggestions in LanguageEnglish
- Some useful tools:
Please add your experience, comments here
Maintaining the translations between different tiki releases
A translator is supposed to work on Head until a pre-release is available (named RCxx). At this moment he is supposed to work on the CVS on this pre-release until a final release is available. The developpers are supposed to do a minimun change in the strings during this time. After the first release, the translator can go back to head.
Two tools are available to facilate the merge between the released version and the head version:
- doc/devtools/mergelang.pl (see the documentation in the file)
- get_strings.php?lang=xx& patch where the lang/xx/language.patch is the language.php of the release
Admin documentation
Where to find a language file
All the language.php files are delivered with Tiki.
FAQ
CharacterEncodingTrouble
Utf8 and php string functions
The strings functions in php are not multibyte safe - and Tiki uses Utf8.
In Tiki1.7, the only way to have the strings working is to use the php multibyte support and to overload the string functions
In 1.7.2, Tiki supplies a limited mb_substr if this function doesn't exist . Some calls have been changed from substr to mb_substr - no functions are provided for the other string functions.
Right to Left Language
- Some wiki markers: {r2l},{l2r}, {rm}, {lm} can be used to change the text direction
- a css BiDi.css has been written for a right to left site.
Developer's documentation (How to enter a string)
Please follow the format convention described in TikiStringsFormatConvention
Some strings seems to be generated on the fly. Please read UnusedWords !
- In Smarty, the strings are between the tags string{/tr}:
- The string can be on multiline.
- The string can contain Smarty variables. Depending of the language file, the translation can occur before or after the variable substitution . For example :
- {$value}{/tr}, and value=none or all. The string "{\$value}" will not be found in the language file, but "none"=>"aucun" and "all"=>"tous" will be found.
- You will send {$nb} emails{/tr}. In the language file, you will find "You will send{\$nb} emails"=>"Vous recevrez {\$nb} emails"
- if you know that a string will be translated later via a variable, please add the comment {*get_strings string{/tr} *} to have the string added to the language file. (tiki1.9)
- In PHP, the strings are the parameter of the function tra
- the string can contain php variable
- The string can be tra("Release %s"). In the language file, you will find "release %s"=>"version %s"
- if you know that a string will be translated later via a variable, please add //get_strings tra("string") to have the string added to the language file.
(tiki1.9)
The translation phase in Smarty occurs at 2 moments
- In a prefilter: it means when the Smarty cache is built. It means that the translation is not done each time you access a template but only once.
- In a plugin : The string with variable or not find by the prefilter function is look again each time the template is accessed.
Dev pages
I18nDev
MultiLingualDev
UnusedWords