Question

I'm developing an app for myself which is using Google Directions to display some directions from my place to a certain location on the map.

I'm in Bulgaria, so the street names are in Bulgarian. But I want my app to be English only.

Therefore I'm deleting the Cyrillic(Bulgarian) letters and only show the turn-by-turn directions in English.

That's what I was doing. Today, though, I tried to do the same and my app showed me like..

Head \u003cb\u003ewest\u003c/b\u003e on \u003cb\u003eул. „Княз Ал. Дондуков-Корсаков“\u003c/b\u003e toward \u003cb\u003eул. „Академик Петко Стайнов“\u003c/b\u003e".

should be like Head west on [place] toward [place]".

Now, I'm not receiving the English names of the streets in the JSON file I'm receiving from the Google Directions API.

It's strange to me why is this happening and I don't know how can I tell Google that I only want the English names of the streets.

I set language to English in my request but still that didn't help.

Was it helpful?

Solution

Use this code if it is android..

if not android specify application, it does matter, as application read locale information from the device and location settings if not specified, that depends on application..

String uri = String.format(Locale.ENGLISH, "http://maps.google.com/maps?saddr=%f,%f(%s)&daddr=%f,%f (%s)", sourceLatitude, sourceLongitude, "Home Sweet Home", destinationLatitude, destinationLongitude, "Where the party is at");
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(uri));
intent.setClassName("com.google.android.apps.maps", "com.google.android.maps.MapsActivity");
startActivity(intent);
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top