App-level Language Setting
Integration
Generally, the changeAppLanguage
API should be called in the following cases:
The App is launched(e.g. in the initState method of your App State.).
Users change the app language manually.
Other cases that change app language.
Calling sequence
Currently, FireworkSDK.getInstance().changeAppLanguage
will recreate the activity on Android. Therefore, we need to follow the calling sequence.
Generally, you also have codes for switching languages, such as the codes of caching the language. Please call FireworkSDK.getInstance().changeAppLanguage
after all your codes for switching languages. For example:
Add codes on Android project
To be able to use the in-app language feature, the following configuration needs to be added to the app project.
Override the attachBaseContext
method in MainActivity
.
attachBaseContext
method in MainActivity
.If you need to support RTL, then please add the following configuration to the AndroidManifest.xml
AndroidManifest.xml
Language support table
Language | Language code | iOS | iOS translation | Android | Android translation |
---|---|---|---|---|---|
English | en | Supported | 100% | Supported | 100% |
Spanish | es | Supported | 76% | Supported | 41.1% |
Portuguese(Brazil) | pt-BR | Supported | 58% | Supported | 41.1% |
Russian | ru | Supported | 52% | Supported | 26.3% |
Polish | pl | Supported | 64% | Supported | 41.1% |
Japanese | ja | Supported | 76% | Supported | 43.2% |
Arabic | ar | Supported | 80% | Supported | 85.3% |
Persian | fa | Not supported | NA | Supported | 86.3% |
Last updated