In my application,i am use MapView. but it display map in English language,but I want to display MapView in Hebrew language.
Like THIS.
How it possible in android?
Thanks in advance.
In my application,i am use MapView. but it display map in English language,but I want to display MapView in Hebrew language.
Like THIS.
How it possible in android?
Thanks in advance.
It depends on your phone language settings. You can change language settings in code, but not forget to change to default after closing your app.
Resources standardResources = getApplicationContext();
DisplayMetrics metrics = standardResources.getDisplayMetrics();
Configuration config = new Configuration(standardResources.getConfiguration());
config.locale = new Locale("ja") // change
standardResources.updateConfiguration(config, metrics);
// in onDestroy()
config.locale = Locale.getDefault(); // default
standardResources.updateConfiguration(config, metrics);
in your MapActivity.onCreate method you can ovverride the default locale with one line of code, the following is for hebrew:
Locale.setDefault(new Locale("iw","IL"));
Please note that this changed the locale for your entire activity so if you have any localized resources they will be affected as well.
Hope this helps.