ICU plural generator for Flutter ARB files

Pick your languages: the tool shows the plural categories each one requires, with example numbers, and generates the ICU message ready to paste into your ARB files. Everything runs in your browser; the tool is free and needs no signup.

Generate a plural message

Languages

Then check every translation keeps its placeholder

LocalePilot is a desktop app that opens all your ARB files, compares each translation's ICU placeholders with the source, flags missing keys and exports with a backup. It is being finalized for macOS: leave your email to hear about the launch.

Why a plural changes from one language to another

The zero, one, two, few, many and other categories follow each language's CLDR rules. In English, one only means 1; in French it covers 0 and 1; Russian and Polish add few and many; Arabic uses all six; Japanese has a single one, other. A two-branch message written for English is therefore incomplete as soon as you translate it.

The tool reads these rules in your browser (Intl.PluralRules): the categories and example numbers shown are the language's own, with no table to maintain.

The =1 trap with gen-l10n

An =1 branch becomes the one category in the code flutter gen-l10n generates. In French that category also applies to zero: with count = 0, "1 article restant" would show. Prefer the one category with the number in the text, or add an =0 branch: the tool offers it as a checkbox. Details are in the guide on ICU plurals and placeholders.

How to use the result

  1. Copy each language's "key": "{count, plural, …}" line into the matching app_xx.arb file.
  2. Add the @key metadata once, in the template file.
  3. Run flutter gen-l10n: a missing other branch or an unclosed brace stops generation with the file name.

To then check that no translation dropped or renamed its placeholder, use the ARB missing keys checker.

Limits of the tool

The tool generates the structure; you write the text of each form. It does not handle select messages or nested plurals, and does not double apostrophes if you turned on use-escaping in l10n.yaml.

Frequently asked questions

Which plural categories do I need for French?

In practice one (0 and 1) and other. French's many category only concerns millions: the tool marks it optional.

Why is the other branch mandatory?

flutter gen-l10n rejects a plural without an other branch and stops generation, naming the file. The tool always adds it.

What is =1 compared with one?

In the generated code, =1 becomes the one category, which also covers 0 in French. Put the number in the one branch or add =0.

Is my text sent to a server?

No. Messages are assembled in the page from your browser's plural rules; nothing is sent.

Does it work for a language that is not in the list?

Yes: type its code (for example cs or sv) in the free field. The tool accepts any code your browser recognizes.

How is this different from LocalePilot?

This tool writes one plural message. LocalePilot is a desktop app, being finalized for macOS, that opens all your ARB files and checks every translation's ICU placeholders before export.

Get notified at launch

LocalePilot is being finalized. Leave your email to hear when it launches.

  • macOS 12 or later · Ollama or LM Studio optional
  • App interface in English, French, Spanish, Italian and Portuguese.