简体   繁体   中英

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM