Which plural form does your number take?
Pick a language and type any number. The tester asks your browser's native
Intl.PluralRules
implementation — the same CLDR data used by ICU — which plural category applies.
CLDR category for
All categories in this language
Quick check: numbers 0–24
Using this in Laravel
Laravel's trans_choice() picks between pipe-separated forms.
The number of forms your lang file needs depends on the language — see the exact mapping,
with real sample numbers, in our per-language guides:
Careful: Laravel does not use these rules directly
The categories above come from CLDR. Laravel's
trans_choice() resolves pipe-separated forms with its own
per-locale table in MessageSelector, derived from Zend
Framework — and the two disagree for some languages. Polish resolves to three Laravel forms
where CLDR defines four categories, and only underscored locales
(pt_BR) match the table, so a hyphenated
pt-BR — from a URL segment or the browser's
navigator.language — silently falls back to the first form.
Frequently asked questions
How many plural forms does my lang file need?
It depends on the language, and on which rule set you mean. This tester shows the CLDR categories your browser reports, which is the number of grammatically distinct forms the language has: one for Japanese, two for English, three for Polish under Laravel, six for Arabic. Laravel picks between pipe-separated forms using its own per-locale rules, so check the count against the guide for your language before writing the file.
Does Laravel use CLDR plural rules?
Not directly. Laravel's Illuminate\Translation\MessageSelector carries its own table of per-locale rules, derived from Zend Framework code, and returns a numeric index into your pipe-separated forms. Those rules agree with CLDR for most languages but not all — Polish, for example, resolves to three Laravel forms while CLDR defines four cardinal categories.
Why does trans_choice() always return the singular?
Two common causes. Either the locale is not in Laravel's rule table, in which case it falls back to the first form; or you supplied fewer forms than the rule expects, and Laravel falls back to the first segment. Note that the table only matches underscored locales such as pt_BR, so a hyphenated pt-BR — from a URL segment or the browser's navigator.language — never matches. Normalise hyphens to underscores before calling setLocale().
What is the difference between {0} and the pipe forms?
Explicit conditions — {0}, {1}, [2,19], [20,*] — are matched before any locale rule is consulted, so they behave identically in every language. Bare pipe-separated forms rely on the locale rule to choose an index. When you need exact control, especially for zero-states or ranges, the explicit syntax is the safer choice.
Where does this tool get its data?
From Intl.PluralRules in your own browser, which is backed by the same CLDR data ICU uses. Nothing is sent to a server, so the categories you see are exactly what a CLDR-compliant runtime would select.
Other free tools
Untranslated Key Detector
Scan any website for leaked i18n keys: dot-notation identifiers, missing-translation markers and unrendered placeholders your users can see.
Blade Hardcoded String Scanner
Paste a Blade template and find text that should be behind __() — with suggested keys and a generated lang file.
AI Translation Cost Calculator
Keys × languages = quota units. Estimate the initial run and the monthly churn for your project.
Lang File Converters
Convert between Laravel PHP arrays, JSON, YAML and CSV — nesting, placeholders and plural pipes preserved.
Manage plurals across 30 languages in one place
Getting the forms right is step one. LangSyncer stores every language's plural forms with your keys, translates the missing ones with AI, and publishes changes to production in seconds — no deploy.