Stock Master Tracker docs
v2.0.0
Get help
● Set up · 9 languages

Translations
nine languages, one template.

The app ships in English, German, Spanish, French, Portuguese, Arabic (right to left), Hindi, Indonesian and Turkish. Add or edit a language in one file.

en · de · es · fr · pt · ar · hi · id · tr

01Where the texts are

  • App texts: app/lib/l10n/app_<lang>.arb. app_en.arb is the template (app/l10n.yaml). Flutter generates the Dart code automatically (generate: true in pubspec.yaml) the next time you run or build.
  • Server texts (push messages, the automatic summaries): firebase/functions/src/api/i18n.ts.
  • Widget texts: values-<lang>/sm_widget_strings.xml on Android and the <lang>.lproj folders of StockMasterWidget on iOS. Indonesian is values-in on Android.

02Change a text

  1. Edit the .arb fileChange the value; keep the {placeholders}.
  2. Runflutter pub get then run or build the app.
  3. Run the parity testflutter test test/l10n_parity_test.dart checks that every language has every key and placeholder.

03Add a language

  1. Copy app_en.arb to app_<code>.arb, set "@@locale" and translate every value.
  2. Add the language to APP_LANGS in firebase/functions/src/api/defaults.ts, then in i18n.ts add a text dictionary for it and an entry in LOCALES, so the server answers in it. Add widget strings for Android and iOS too.
  3. Check Arabic-style layouts if the language is right to left; the app mirrors its layout automatically.
Review machine translations

Have a native speaker read finance wording, labels and the disclaimer before you publish in a language.