GL Strings supports pluralization which accommodates different plural rules across languages.
This article will explain how GL Strings handles pluralization within projects and which integration options support it.
GL Strings supports pluralization. Pluralization allows for the display of different messages depending on the quantity selected. These different messages are based on the plural rules of the language. Possible plural quantities include:
These plural quantities are dependent on the language. For example, in English, there is only one singular and one plural form, e.g. “hour” vs “hours.” Other languages, such as Russian, have different grammar rules including additional plural forms. Unicode Common Locale Data Repository (CLDR) defines the specific categories for pluralization.
On the GL Strings dashboard, plural categories are tracked in separate keys. These keys are grouped together in the Editor. Your project will contain all required plural categories for a given key across all languages, even if some of the languages themselves do not have those specific plural forms. In languages with fewer plural categories, like English, the other plural keys function as placeholders since keys exist across languages in a GL Strings project.
Where needed, users can create pluralized IDs within a GL Strings project by appending the specific pluralization rule to the ID. Those pluralized IDs are then grouped together for easier tracking. See the Manual Pluralization section below for more information.
In order to use Pluralization in file-based localization workflows on GL Strings (e.g. manual import/export, CLI), the file formats used for an app must also support it. See the Supported File Formats section for more detailed information.
Please note that pluralization is separate from plural arguments for ICU Message Syntax like the example below.
For more information on plurals in ICU syntax, see our article here.
Pluralization can be used with the Android SDK, iOS SDK, and CLI Integrations. Users can also manually add pluralized keys to an GL Strings project.
Each option for uploading pluralized content behaves in a slightly different way:
When downloaded, GL Strings formats the same pluralized keys according to the syntax of the given file format.