Set format in ct.yml to the format your code loads. ct init --format po --source-language de writes it for you.
format | Files |
|---|---|
json | JSON |
yaml | YAML |
xliff | XLIFF |
po | Gettext |
android | Android strings.xml |
strings | iOS .strings |
properties | Java properties |
arb | Flutter ARB |
How files are mapped #
- Every language lives in its own file, named by
translations({lang}is the language code). - Spreadsheet-style formats with several languages per file (CSV, Excel, Apple String Catalog) can be imported and exported in the web app instead.
- XLIFF and Gettext files carry the source text next to the translation. The source file is read for its source texts, and pulled files contain them as well.
- Gettext uses the
msgctxtas the key when there is one, otherwise themsgid.
Messages #
Messages are passed through untouched, so ICU syntax such as {count, plural, ...} round-trips.
- Gettext, Android and YAML plurals are converted to ICU plurals when they are pushed. When pulling, ICU messages are written as plain messages.
- Nested JSON becomes dotted keys (
checkout.title) and is nested again on pull. - Values that are not text are skipped with a warning.