Warning

This page is for developers and theme creators who edit strings to translate (mainly the *.tpl files). In order to minimize the language file, and to have the same look across Tiki, some rules need to be followed.
Some are arbitrary, some are for correct English. Feel free to propose other rules.

English conventions (capitalization)

Menus

in a menu, if it's a main Tiki feature or a named section each first letter of significant words is upper case, otherwise (when it's a request for an action) the string has an upper case first letter only

Localized strings

Dealing with variables

PHP variables should never be placed directly inside localized strings. Instead you should use placeholders. See examples below.

PHP: use tr("Changed from %0 to %1", $old, $new) instead of tr("Changed from $old to $new")

Smarty: use {tr _0=$old _1=$new}Changed from %0 to %1{/tr} instead of {tr}Changed from $old to $new{/tr}

The problem with variable is that strings for translation are extracted from the source code while to display them to the user they are interpreted by PHP. So, for example, the string below:

"$comments_cant comments"

Translators will see the above string as it appears in the source code ("$comments_cant comments") but in the application $comments_cant will be replaced by the variable value. Tiki will never find the translation for "10 comments" or any other value of $comments_cant.

Best practices

Avoid slang and abbreviations.

Use entire sentences since word order change from language to language.

Use placeholders instead of variables inside the string (explained above).

Common mistakes

Below is a list of examples of what you should NOT do (they were all extracted from Tiki and need to be fixed):

Wrong: tra('To send an email once the tracker item has been created. Format: from').'|'.tra('to').'|'.tra('template')
Correction: tr('To send an email once the tracker item has been created. Format: from|to|template')

Wrong: {tr}There are no wiki pages similar to '{$page}'{/tr}
Correction: {tr _0=$page}There are no wiki pages similar to '%0'{/tr}

Other considerations for developers

Learn how to run get_strings.php and do the following:

Spellcheck your strings. If you save the old language.php file, you only need to spellcheck the difference. Translators have to "retranslate" spelling corrections

Alias

Keywords

The following is a list of keywords that should serve as hubs for navigation within the Tiki development and should correspond to documentation keywords.

Each feature in Tiki has a wiki page which regroups all the bugs, requests for enhancements, etc. It is somewhat a form of wiki-based project management. You can also express your interest in a feature by adding it to your profile. You can also try out the Dynamic filter.