0

I am using Google Map API for displaying map.It shows google map in english but i want to display google map content in hindi language.I am using this code but its not working:

          String languageToLoad = "hi"; // your language
            Locale locale = new Locale(languageToLoad);
            Locale.setDefault(locale);
            Configuration config = new Configuration();
            config.locale = locale;
                getActivity().getBaseContext().getResources().updateConfiguration(config,
                    getActivity().getBaseContext().getResources().getDisplayMetrics());
  • 1
    try this `languageToLoad="hi_IN";` – User_1191 Jan 08 '16 at 06:18
  • 2
    User_1191 is right for google map content is show on Hindi used "hi_IN" and for other supported language list is show on http://stackoverflow.com/questions/7973023/what-is-the-list-of-supported-languages-locales-on-android link – Krunal Patel Jan 08 '16 at 06:20

1 Answers1

-1

Change your language code:

 String languageToLoad = "hi_IN";
    Locale locale = new Locale(languageToLoad);
    Locale.setDefault(locale);
    Configuration config = new Configuration();
    config.locale = locale;
    getBaseContext().getResources().updateConfiguration(config,
            getBaseContext().getResources().getDisplayMetrics());

    setContentView(R.layout.activity_maps);

    setUpMapIfNeeded();

Here is a link for codes: Android Supported Language and Locales

User_1191
  • 981
  • 2
  • 8
  • 24