Toolvito

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

Paste an ARB file. For a translation, paste the template too: missing and extra messages and placeholders that differ are found as well. Every rule is the one flutter gen-l10n applies.

Your values

gen-l10n takes the locale from the name (app_en.arb, app_pt_BR.arb). Leave it empty to skip that check.

The file of template-arb-file in l10n.yaml (usually app_en.arb). Leave it empty to check the template itself.

More options

Off by default in Flutter: then an apostrophe is a plain letter.

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.

Check the whole Flutter project (l10n.yaml, every ARB file, the Dart code, iOS)

Check the whole Flutter project: l10n.yaml, every ARB file, the Dart code, iOS

Choose a ZIP of your Flutter app (with l10n.yaml, lib and ios; build and .dart_tool are skipped). l10n.yaml is read for the template and the class name, every ARB file is checked with the rules of gen-l10n and against the template, the Dart code for messages it uses that the template lacks, and Info.plist for the iOS locales.

Or drop files here. ZIP, JSON, ARB, YAML, YML, PROPERTIES, PO, POT, XLF, XLIFF, XML, STRINGS, JS, JSX, TS, TSX, DART or PLIST, up to 200 files, 200 MB each at most.

    More options

    The calculator above works on your device. When you run a task in this section, Toolvito receives the values and result you submit to make the file or run the check. 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.

    How to validate an ARB file

    1. Paste or open the ARB file. Type its file name (such as app_de.arb): gen-l10n takes the locale from it.
    2. 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.
    3. Press Validate. Each problem names the message and its line; Missing messages gives an ARB file of the messages to translate.
    4. 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.

    Related tools