Translate ICU messages with confidence.

Try It Out Learn More
{ gender, select,
 female {{
    count, plural,
       =0 {Ela não tem nenhum Pokémon}
      one {Ela tem só um Pokémon}
    other {Ela tem # Pokémon}
  }
}
  other {{
    count, plural,
       =0 {Ele não tem nenhum Pokémon}
      one {Ele tem só um Pokémon}
    other {Ele tem # Pokémon}
  }
}
}

Before ICU messages are shown to users, placeholders are replaced with data from the application.

The placeholder name, wrapped in curly braces, should not be translated.

reordering
Welcome, { name }!
+
name: Ash
=
Welcome, Ash!
Bem vindo, { name }!
+
name: Ash
=
Bem vindo, Ash!

While you should not translate placeholders, they can be moved around to fit the translated phrase.

placeholder types
Hello, {firstName} {lastName}! 歡迎 {lastName} {firstName} 回來

Placeholders can have a type. This helps numbers and dates get locale-specific formatting.

The type is always one of these: number, date, time, ordinal, duration, spellout, plural, selectordinal, or select. The type and preceeding comma must not be translated.

placeholder styles
Trainers: { count, number }
+
count: 21629693
=
Trainers: 21,629,693

Placeholders can have a style too. This is extra information for how the value will be formatted.

The style must not be translated either.

nested messages
Caught on { catchDate, date, short }
+
catchDate: 2016-07-21T15:21:07Z
=
Caught on: 7/21/16

Placeholders of select, plural, and selectordinal types also have nested messages that are chosen by matching the value against a selector.

The selectors are not translated, but the nested messages are translated.

white space
{ gender, select,
  male {He avoids bugs}
female {She avoids bugs}
 other {They avoid bugs} }

+
gender: female
=
She avoids bugs

Space inside a placeholder isn’t important. You can add new lines or extra space to make it easier to read.

Space outside placeholders and in nested messages will be displayed to the user.

hash placeholder
{count,plural,=0{No candy left}one
{Got # candy left}other{Got # candies left}}

=
{ count , plural ,
   =0 {No candy left}
  one {Got # candy left}
other {Got # candies left} }

Nested messages in a plural can have a special placeholder: #. It is shorthand for the same value as the plural, formatted as a number.

plural can also have an offset, which should not be translated. (=number selectors are checked first, then the offset is subtracted before matching keywords one, few, etc.)

wrap up
{ trainers, plural, offset:1
   =0 {The gym is empty}
   =1 {You are alone here}
  one {You and # trainer}
other {You and # trainers} }

+
trainers: 2
=
You and 1 other trainer

This page made with ❤️ by Andy VanWagoner on GitHub.

Thanks to ICU for awesome i18n.

Open ICU Message Editor
{ gender, select,
 female {{
    count, plural,
       =0 {Ela não capturou nenhum}
      one {Ela tem capturado um só}
    other {Ela tem capturado #}
  }
}
  other {{
    count, plural,
       =0 {Ele não capturou nenhum}
      one {Ele tem capturado um só}
    other {Ele tem capturado #}
  }
}
}