Flutter Localisation
Configure Flutter localisation in pubspec.yaml by adding flutter_localizations to your dependencies and setting generate: true under the flutter section. Create an l10n.yaml configuration file at the project root specifying arb-dir (typically lib/l10n), template-arb-file (your source ARB such as app_en.arb), and output-class (AppLocalizations by convention). Running flutter gen-l10n — or enabling generate in pubspec.yaml to trigger it on build — produces a typed Dart accessor class. Reference localised strings as AppLocalizations.of(context)!.welcomeMessage throughout your widget tree, never as raw string literals.
Write ARB metadata entries for every translatable key. A metadata entry — the same key preceded by an at-sign — carries a description field explaining the string's context, a placeholders object defining any interpolated values with their type and example, and plural-form definitions. Well-written descriptions are the context Language Monster surfaces during translation. Use named placeholders with explicit type annotations in ARB metadata rather than positional format specifiers — named placeholders are self-documenting and Language Monster reads ARB metadata to identify and protect placeholder values during translation.
Use ICU message syntax for strings that vary by count, gender, or other parameter. A plural entry in ARB correctly handles every plural category of every supported language when gen-l10n generates the Dart accessor. Avoid duplicating strings with if-else Dart logic — define the variation in the ARB using ICU syntax and let the generated code and Flutter intl runtime handle it. This ensures correct output for Arabic (six plural forms), Polish (four), Russian (three), and every other supported language.
Connect your GitHub or Bitbucket repository to Language Monster. Language Monster detects ARB files automatically by naming pattern, pulls strings from your source ARB, applies Glossary terms and Translation Memory, and pushes completed ARB files back to your repository. ARB metadata entries are preserved through translation. Language Hierarchy eliminates redundant work for regional English variants — define British English as the parent locale and Australian English as a child that only overrides strings where content genuinely differs.
Run the intl_translation package's extract_to_arb tool in CI to verify ARB files stay in sync with strings referenced in your Dart source. Language Monster's quality controls validate named placeholder integrity against the ARB metadata definition, check ICU message structure, run spelling and grammar checks on every translation, and flag inconsistencies before files are pushed to your repository.
