Table of Contents |
---|
Introduction
As you may know, different languages have a different number of plural forms available for them. The simplest example is one month and many months in English, vs one miesiąc, one and a half miesiąca, two-three-four miesiące, and many miesięcy in Polish. This is a challenge in localization if you wish to localize your applications or Web content where the sentence contains a number of things as a variable instead of as a specific number.
...
Specifics
Supported file formats
XTM can handle localization of plurals in four file formats:
...
By default handling plurals is turned off.
Determining the number of plurals for a given language
Keep in mind that different languages have a different number of plural forms available for them. In order to find out more on the actual number of plurals for a given language, please, visit the the following website: https://unicode-org.github.io/cldr-staging/charts/latest/supplemental/language_plural_rules.html.
Note |
---|
IMPORTANT! The number of plural forms in a source file should be consistent with the number of plurals in the source language. In the target file, there will be as many plurals as it is set in its corresponding target language on the back-end side of the XTM instance (configurable by the XTM Support team). |
Plurals syntax in respective file formats
JSON with ICU
IMPORTANT!
Please, note that the ICU syntax is handled as plurals only in the JSON files!
...
Also, please, see the content in Workbench:
...
Android XML
Please, see the exemplary structure of the Android XML file. The syntax is pretty self-explanatory.
...
Also, please, see the content in Workbench:
...
PO/POT files
PO files are bilingual, but by default, only segments without translation are extracted for translation. Again, it can be adequately configured by the XTM Support team. Please, see an exemplary structure:
...
Also, please, see the content in Workbench:
...
Stringsdict files
Stringsdict files are for translating iOS applications, and their file looks quite different from the Android file:
...