- Overview
- Supported Languages
- Adding Your Own Localization
- Testing Your Localization
- Contributing Back to the Community
Overview
The ThingsBoard PE Mobile Application supports multiple languages out of the box. You can add your own locale or improve existing translations to make the app accessible to users in your preferred language.
Supported Languages
Currently, the ThingsBoard app supports the following languages:
- English
- Arabic
- Chinese (Taiwan)
- Chinese (Simplified)
Adding Your Own Localization
Follow these steps to add a new language or improve existing translations:
Step 1: Navigate to Localization Files
Navigate to the lib/l10n
directory in your project. You will see files like:
intl_ar.arb
intl_en.arb
- And other language files
Step 2: Create Your Language File
Add a new .arb
file with your translation using the format:
1
intl_(languageCode).arb
For example:
intl_es.arb
for Spanishintl_fr.arb
for Frenchintl_de.arb
for German
Step 3: Add Translations
- Copy the contents of the
intl_en.arb
file into your newly created file - Start translating the English text to your target language
- Keep the keys unchanged, only translate the values
Example structure:
1
2
3
4
5
{
"appTitle": "Your App Title Translation",
"login": "Your Login Translation",
"password": "Your Password Translation"
}
Step 4: Learn More About Flutter Internationalization
For detailed information about Flutter’s internationalization system, we recommend reading the official Internationalizing Flutter apps guide.
Testing Your Localization
The process for testing your new localization depends on your app version:
App Version Pre-1.7.0
Run the following command to integrate your changes and generate new localization files:
1
flutter gen-l10n
This command will generate the necessary localization files for your added language or update existing localizations.
App Version 1.7.0+
We recommend installing the Flutter Intl extension, which automatically tracks localization changes and regenerates localization files.
Available Extensions:
Alternative Method (Without Extension)
If you prefer not to install the extension, you can use the manual approach:
- Add intl_utils to your project’s dev dependencies:
1
flutter pub add -d intl_utils
- Generate localization files after each change:
1
dart run intl_utils:generate
Run this command after each change in your localization files to integrate those changes into your app.
Contributing Back to the Community
We greatly appreciate community contributions to improve the ThingsBoard Mobile Application’s localization support.
How to contribute:
- Make a pull request to our repository with your
.arb
files - Fill an improvement ticket with attached
.arb
files
Your contributions help make the app accessible to users worldwide, and we’ll add new localizations to the app globally for everyone to benefit from.