Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get a map in different languages using Google maps API V2 for android

I'm building an application using Google Maps Android API v2 and i'm able to get the map:

private void initMap() {
        SupportMapFragment mf = (SupportMapFragment) getSupportFragmentManager()
                .findFragmentById(R.id.map);
        map = mf.getMap();                      
    }

The thing is, my app should support many languages and i was wondering if it's possible to get a map in different languages according to locale?

like image 277
Tomer Avatar asked Jan 01 '26 04:01

Tomer


1 Answers

See this link

It says that

The API detects the browser settings of the user and set the language appropriately. It is possible to override the language in the APIs; more information is available in the JavaScript API documentation. Map controls and directions in the Directions Panel have been translated for a subset of languages listed in Supported Languages Spreadsheet. Labels on maps are presented in the preferred language when translations are available.

So, Just change the locale on the device. If translations are available, they will be shown automatically.

like image 79
Lal Avatar answered Jan 02 '26 18:01

Lal



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!