Is it possible to define a string in a Flutter ARB file that should not be translated?

Yes, you can define a string in a Flutter ARB file that should not be translated, but there is no special syntax for it like in Android Resources XML files. One way to do this is to use the same translation for that string in all ARB files and leave a comment explaining why it should not be translated.

Examples of things that don't need to be translated are brand names, acronyms, language names, and well-known terms like metrics.

The en.arb file:

{
  "@@locale": "en",
  "appTitle": "Localizely",
  "@appTitle": {
    "description": "Do not translate app name."
  }
}

The de.arb file:

{
  "@@locale": "de",
  "appTitle": "Localizely",
  "@appTitle": {
    "description": "Do not translate app name."
  }
}

Consistency is important in translations, and using a glossary in translation management systems is a helpful way to achieve this. Glossaries give extra information that can help us keep translations consistent and avoid unnecessary translations.

Flutter internationalization tutorial:

Copyrights 2024 © Localizely