- Scope
- Adding a language in civicrm-l10n.tar.gz
- Languages available on Transifex
- Regional translations
Scope
This page explains the policies around languages supported by CiviCRM:
- Languages distributed in the civicrm-[version]-l10n.tar.gz (officially supported languages)
- Languages available on Transifex
- Policies on regional translations
Adding a language in civicrm-l10n.tar.gz
When a language reaches 20% translation completion on Transifex, it can be added to the list of officially supported languages by CiviCRM.
- It means that the language can be added to the civicrm-l10n.tar.gz release files (which makes it easier for people to use and update translation files).
- The language can be made available for CiviCRM Spark.
When a language reaches 20%, you can make a request on the translation issue tracker.
Once the language is added, announce it on the translation mattermost channel and also consider doing a blog post about it (involving/thanking the translators).
Technical changes
- Create the new translation in transifex.
- If a language variant (e.g. fr_CA vs fr_FR), do an initial sync from an existing variant (see the script under Regional Translations below).
- Add the language to conf/distributed_languages.txt.
- Wait a day until the language appears in the daily l10n tarball.
- Create a PR against core to update the relevant files:
- Update xml/templates/languages.tpl
- Run bin/regen.sh. This will autoupdate two more files:
- install/langs.php
- sql/civicrm_generated.mysql
- If a language variant and there was only one variant before, add a default variant in
- Add an upgrade script. Here is an example for nl_BE.
- In sites that have installed the latest l10n tarball but not upgraded core, the language will still be available but will appear as just the language code in dropdowns, instead of the full name.
- Spark:
- Add the language to the list of available languages
- Add the language to the server locales, otherwise native-gettext will not work: aegir role - look for the
aegir-locales
tag. - Run
ansible-playbook -l 'spark-*.civicrm.org' --tags aegir-locales ./site.yml
Languages available on Transifex
We often receive requests for new languages on Transifex, but because of some confusion in the user interface, many requests are for languages that already exist. For example, Russian might exist as "Russian (ru)" and Transifex will allow to request a new language for "Russian (ru_RU)". Transifex will also allow to request regional translations.
New language requests are often declined for this reason. If you would like to translate CiviCRM into a new language, please post a request on the translation issue tracker.
Regional translations
Translating CiviCRM is a lot of work. Not only must CiviCRM itself be translated, but there are also extensions, documentation, website content, etc. We strongly encourage to avoid creating new regional translations when possible.
That said, there are regional translations that have a sufficiently large mass of users which are ready to do the work and support it in the long term.
If you would like to translate CiviCRM into a new regional language, please post a request on the translation issue tracker. Please argue your case: what kind of regional differences are there? can the "main" translation be adapted to be more neutral?
Once we create a new regional translation, we can also synchronize the translation efforts of the main 'core' translation, meaning that one or both languages can inherit the translations from the other language, but only for untranslated strings. This makes it possible to reduce translation efforts, and only have to review strings.
For more information on the technical setup, see: sync-regional-translations.