2

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.

Akshay
  • 2,490
  • 4
  • 34
  • 52
Mehul Santoki
  • 1,208
  • 1
  • 11
  • 25

2 Answers2

0

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);
Artyom Kiriliyk
  • 2,495
  • 1
  • 16
  • 21
0

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.

AnhSirk Dasarp
  • 9,026
  • 6
  • 43
  • 54