Calculates on this device. File exports run online.
Flutter ARB Validator
Paste an ARB file, and for a translation its template (usually app_en.arb). The page applies the rules of flutter gen-l10n: names that are Dart method names, ICU plural and select syntax, placeholders and their types, DateTime and number formats, @@locale against the file name, and messages that are missing or extra.
Enter your values
Check these values
Your values are worked out in this browser. They are not sent to a server.
Your result will show here
Fill in the values, then choose the button below them.
Your result
How it was worked out
How to validate an ARB file
- Paste or open the ARB file. Type its file name (such as app_de.arb): gen-l10n takes the locale from it.
- For a translation, paste the template file too. Missing and extra messages, placeholders that differ and the plural forms the language needs are checked then.
- Press Validate. Each problem names the message and its line; Missing messages gives an ARB file of the messages to translate.
- To check all files of an app at once, choose Validate all ARB files of an app and choose the files of lib/l10n.
The rules that are checked
- Message names become Dart methods: letters, digits, _ and $ only, a lower-case first letter, and no Dart keyword (class, if, get …).
- ICU syntax: every { has its }, plural and select have an "other" choice, plural forms are zero, one, two, few, many, other or =n.
- Placeholders: a plural argument must be int, double or num; a DateTime needs a format such as yMMMd; a number format must be one of NumberFormat (currency, compact, decimalPattern …); a declared placeholder must be used. An undeclared one is allowed (gen-l10n makes it an Object) and noted.
- Locales: @@locale must agree with the file name; two files may not have one locale.
- Translations: placeholders must be those of the template message; the plural forms of the language come from Unicode CLDR (Polish needs one, few, many and other).
- JSON: a key given twice is an error, because JSON keeps only the last one.
Apostrophes and use-escaping
gen-l10n reads an apostrophe as a plain letter unless l10n.yaml says use-escaping: true; then '{text}' is literal text with braces. Tick the box under More options when your project uses it.
Limits you should know
- The Dart code gen-l10n makes is not compiled here; messages your code uses are checked by the Flutter Localization Checker or the project check below.
- Custom date patterns (isCustomDateFormat) are accepted as they are.
Privacy
Files are checked in your browser. Only what you choose in the box below is sent to the Toolvito server, to be checked there. Download the result within one hour after the job finishes. Choose Delete files now to request earlier removal. The hourly cleanup normally removes files within one to two hours after completion.