I have an app with only support one language, Bahasa Indonesia. So how can I change the Facebook's accountKit language into our supported language?
I've try the guide which told me to put this config in the build.gradle
and the accountKit UI is still in english.
defaultConfig {
resConfigs "id"
}
Is there any way to change the language without changing the device language?
I've got the solution! Just change the locale of the activity which contains the account kit and the UI language will be changed automatically. Here is a list of supported languages for Account Kit.
I've added following code to achieve Bengali language in onCreate() of the activity from which the Account Kit intent is called:
String languageToLoad = "bn";
Locale locale = new Locale(languageToLoad);
Configuration config = new Configuration();
config.locale = locale;
getBaseContext().getResources().updateConfiguration(config, getBaseContext().getResources().getDisplayMetrics());
And the result is this :
The Indonesian two letter code is usually "in" not "id".