Skip to content

System Advanced: Localization

Elan Ruusamäe edited this page Oct 24, 2015 · 1 revision

Localization

We need your help!
Please consider contributing to the translation effort.

The localization of Eventum into other languages is currently handled through the Launchpad Project Page.

Translation Status

You can find a list of the available languages and status, please see the Translation Status page.

Imported from Launchpad

The localization files shown in GitHub appear to be out-of-date, but don't worry. The localization files are imported from Launchpad for every release, see the release script for additional details.

How Localization Works

Eventum uses the smarty-gettext package to handle localization.
Strings that require translation can be found in the HTML templates or PHP.

  • HTML templates files will surround the text to be translated with '{t}' and '{/t}'.
    <html> <body> {t}Hello world{/t} </body> </html>
  • Strings found in the PHP files use the gettext('_string_') function.
    <?php echo gettext('Hello world'); ?>

This localization files contain name value pairs for each translation item. The original string is identified with msgid and the msgstr value contains the localized string.

msgid "Hello world"
msgstr "Hola mundo"

Spanish Output: Hola mundo

System Variables & Example Strings

When making contributions to the localization effort, there are system variables and example strings that do not require translation.

%1$s
%2$s
@example.com

Adding a new language to Eventum

To add a language not shown in the translation status page, please review the older documentation covering gettext, Poedit, and how localization is added to Eventum.

The information covered in the older documentation, covers how to create localization files for your own language. Once the files have been created, they can be included in Eventum by reporting a bug on the LaunchPad project page.

  • a bigger project
    • first subtask #1234
    • follow up subtask #4321
    • final subtask cc @mention
  • a separate task
Clone this wiki locally