English instead of local language for geocoding

I use Geocoder to get the address from lan / lat coordinates. The problem is that the address is in the local language (usually the name of the street). How can I install it in English only?

I use:

Geocoder geocoder = new Geocoder(Context, Locale.getDefault());

I tried:

Geocoder geocoder = new Geocoder(Context, Locale.ENGLISH);
Geocoder geocoder = new Geocoder(Context, Locale.US);

Bad luck.

+3
source share
3 answers

API 19 The
answer is not entirely correct, I think. I just had this case when I set the GeoCoder locale to English, then I am mistaken in street names.
He does not translate them, but he removes language-specific details that bothers me.

"Straße" became "St", for example.

API- Google Maps , , , ( Österreich).

API HTTP Geocoder, , .
, API, .
API HTTP & language, Local.toString() ; , .

+1

, . - . . . - , , -. , .

- , . , . (, ), , .

0

:

    Locale aLocale = new Builder().setLanguage("en").setScript("Latn").setRegion("RS").build();
    Geocoder geocoder = new Geocoder(context,aLocale);

https://developer.android.com/reference/java/util/Locale.Builder.html

0

All Articles