You can translate the website online on Transifex: https://www.transifex.com/projects/p/elementary-mvp/
You can propose new languages if they're not listed.
Please read the branding guidelines before translating and pay attention to spelling mistakes.
Translations strings are extracted from HTML files. A little PHP script analyzes HTML files and exports strings to a JSON file: /backend/extract-l10n.php?page=<page>
. You can change the page
parameter to extract translations from another page (and set it to layout
to translate the website layout). Translations are auto-updated on Transifex using this script.
You can add the include_disabled=1
parameter to print disabled strings too. This behaviour is disabled by default because Transifex doesn't accept false
values. See Disabling a translation for more information.
If you want to change a translation key for an element, just add a data-l10n-id
attribute:
<p data-l10n-id="mylongparagraph">Blablabla</p>
To ignore a translation string, set it to false
in /lang/en/<page>.json
:
{
"elementary OS": false // Can't be translated
}
Alternatively, you can add the data-l10n-off
attribute to a tag:
<p data-l10n-off="1">I'm ignored.</p>
You will need first to install the Transifex client: http://docs.transifex.com/developer/client/setup
Then, run the following command:
tx pull
To pull a new language:
tx pull -l <lang>
To pull all translations, even new ones:
tx pull -a