LogoKikoMart Docs

Languages

Add, remove or change the default language of the apps.

KikoMart supports multiple languages out of the box. Translations are stored as JSON files in assets/language/.

Add a language#

  1. In assets/language/, create a new JSON file named after the ISO 639-1 language code, e.g. es.json for Spanish.

  2. Copy all entries from en.json into the new file.

  3. Translate only the values (right of the colon). Don't change the keys. For example:

    {
      "welcome": "Bienvenido",
      "add_to_cart": "Añadir al carrito"
    }
    
  4. Add a flag icon in PNG format to assets/images/, e.g. spanish.png.

  5. Register the image as a constant in lib/app/resources/images.dart.

  6. Add a new LanguageModel entry to the languages list in lib/app/resources/constants.dart, with the correct language and country code.

Never modify the JSON keys. The app looks up translations by key, so a changed key shows up as missing text.

Remove a language#

Delete or comment out its LanguageModel entry in the languages list in constants.dart.

Set the default language#

Move its LanguageModel entry to the first position (index 0) of the languages list.

Rebuild and reinstall the app after changing languages.