BotNetwork

Plural rules in localized bots

Use ICU/CLDR plural forms, not naive +s.

Guide1 min readUpdated

Why it matters

Plural rules differ by language — do not ship 1 messages or naive ternary plurals for languages with many forms.

Practical steps

  1. Use ICU message format or a library that knows plural categories.
  2. Translate full sentences, not concatenated fragments.
  3. Keep locale in the user/tenant profile.
  4. Test zero, one, few, many where relevant.
  5. Avoid embedding numbers only in images.

Watch out for

  • English-only plural logic for all locales.
  • String concatenation: number + translated word.

Related comparisons and tools