I want to show locations name both in English and local language like Maps app show in android.
Here is my code
public class MapsActivity extends FragmentActivity implements
OnMapReadyCallback {
private final static String TAG = MapsActivity.class.getSimpleName();
private GoogleMap mMap;
private SupportMapFragment mapFragment;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_maps);
// Obtain the SupportMapFragment and get notified when the map is ready to be used.
mapFragment = (SupportMapFragment) getSupportFragmentManager()
.findFragmentById(R.id.map);
mapFragment.getMapAsync(this);
}
@Override
public void onMapReady(GoogleMap googleMap) {
mMap = googleMap;
LatLng dhaka = new LatLng(23.8103, 90.4125);
mMap.addMarker(new MarkerOptions().position(dhaka));
mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(dhaka,10f));
}
}
But when i run this code all locations name in map is in English. But i want to the output like this
here where the location name is both in English and Bengali.
You can get the necessary info from the following links
https://developers.google.com/maps/documentation/javascript/geocoding#GeocodingRegionCodes
http://www.iana.org/assignments/language-subtag-registry/language-subtag-registry
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.