- Supported Languages
- Adding new languages
- Export and import workflow
- Conversion between JSON, CSV and ODS
- Used file formats
All supported languages and language tags can be viewed here or in the wiki.
You need to follow several steps to add new languages:
- Pick the correct tag for your language: https://iso639-3.sil.org/code_tables/639/data
- Add your language tag to the config with its script direction (and possible additional fonts).
- Test the new language on both native and web.
- Add the new language to the wiki.
- Translate our translations in your new language, see export and import workflow.
If you need a new font for your language, the following steps are required:
web
: Add the new font as.eot
,.svg
,.ttf
,woff
andwoff2
along with a.css
stylesheet and a license here.iOS
Add the new font as.ttf
here and register the new font in XCode.android
: Add the new font as.ttf
here.
Translations should be done by professional translators. We usually ask for translations through our service team. If there are enough untranslated strings, they can be submitted to professionals for translations as follows:
- Create an issue in our issue tracker.
- Create a new branch for the translations.
- Export the translations and overrides you want:
yarn export:ods:translations
yarn export:ods:override-malte
yarn export:ods:override-aschaffenburg
- Now you can edit the ODS files (e.g. send them to an external translation service). Exporting plain CSVs is currently not supported.
- Place the edited ODS files in the directories which were generated in the export step.
- Import the translations and overrides you want:
yarn import:ods:translations
yarn import:ods:override-malte
yarn import:ods:override-aschaffenburg
- Review the changes carefully.
Warning: Make sure to check the received translations on mistakes. For example make sure that our placeholders are not translated. The following regex can be used to find invalid placeholders:
{{(?!appName|distance|count|organization|domain|source|message|numberOfCharacters|filter|version)[^}]*}}
External translators generally need csv or ods files. For conversion between json and csv the manage tool can be used. For conversion between csv and ods the csv-to-ods and ods-to-csv can be used.
In order to convert json to ods and vice versa, the intermediate step of converting to csv has to be made.
Convert the specified json file to multiple csv (one per language) in the given directory:
yarn manage convert <json file> <csv directory> csv
Example: yarn manage convert ./translations.json translations-csv csv
Notes:
- The module keys in the CSVs are sorted
Convert the csv files in the specified directory to a json file:
yarn manage convert <csv directory> <json file> json
Example: yarn manage convert translations-csv ./translations.json json
Notes:
- The module and language keys in the JSON are sorted
- The source language is always the first language
Convert all csv in the specified directory to ods: ./tools/csv-to-ods <csv_directory> <ods_directory>
Example: ./tools/csv-to-ods translations-csv translation-ods
Convert all ods in the specified directory to csv: ./tools/ods-to-csv <ods_directory> <csv_directory>
Example: ./tools/ods-to-csv translations-ods translation-csv
- Used for internal representation of our translations
- Structure:
namespace
>language
>(nested) key
>translation
- UTF-8 encoded
- Comma Separated Values
- Each CSV contains exactly one language
- Structured via dot-delimited keys. Keys for translations are created using module names and nested keys.
- UTF-8 encoded
- Used for distribution of CSVs as the CSV format does not define the exact format.