ICU Message Syntax

Crowdin supports ICU Message syntax, that is used to help express the subtleties of language-specific spelling, grammar, and formatting in translations.

Strings that are formatted in the ICU Message syntax can have different types of replacements that are called “arguments”. ICU Message syntax can have different types of replacements that are called “arguments”. Each argument is enclosed in curly brackets and refers to a value in the input data. Arguments of the following types are supported in Crowdin: number, date, time, select, and plural.

ICU Message syntax in the Editor

ICU syntax arguments are always highlighted in the Editor, so you know which part of the string shouldn’t be translated. Change the position of arguments in translation to follow the natural word order in the target language. There’s also a preview mode, that allows you to see how the translation will be displayed in the UI to make sure that all the translatable elements are translated.

ICU Message syntax in the Editor

Plural

Plural type is used to handle plural category variations, as each language has its own set of plural categories (for example, English has “one” and “other”, while Ukrainian has “one”, “few” and “other”).

The following short tags are used to determine the plural categories:

  • zero
  • one (singular)
  • two (dual)
  • few (paucal)
  • many (also used for fractions if they have a separate class)
  • other (required—general plural form—also used if the language only has a single form)

In the Editor you don’t have to manually add or delete plural categories to the translations you are making. Just click Copy Source and the source string will be copied to the translation field with the number of plural categories right for the current target language. Here’s a list of Language Plural Rules.

Plural type

Select

Select type is mostly used to represent the right gender-based inflections in the message.

Select type

Number

The purpose of the number type is to display different number values such as percentage, currency, and decimal numbers independently from the locale conventions for those. This enables adjustment of the message output to the number formats used in different locales.

Number type

Date, Time

Date and time types show date and time values according to the formats preferred in the specified locales. These types can also have a style – an extra information on how the value will be formatted. The following 4 styles can be used: short, medium, long, and full.

Date, Time types

Syntax Errors

Syntax error detection significantly reduces confusion during translation of ICU Message syntax, as the platform automatically identifies potential mistakes in the translation. If a syntax error is found, you’ll see a “Syntax error” message with a suggestion of what should be fixed.

Syntax error detected