I am getting the AddressLine
in local language(Hindi).
I was using Locale.getDefault()
, thought that might be the reason.
But even after changing it to Locale.ENGLISH
I get the same result.
List<Address> addresses = null;
try {
Geocoder gCoder = new Geocoder(c, Locale.ENGLISH);
addresses = gCoder.getFromLocation(lat, lng, 1);
Address addr = addresses.get(0);
String addressLine = addr.getAddressLine(0);
}catch{
}
I expected it to give the value in English, if that's not possible, return null so that i can go with something else other than AddressLine.
EDIT:
Tried this
Locale mLocale = new Locale("en");
Log.d("Display language = ", "" + mLocale.getDisplayLanguage());
Geocoder gCoder = new Geocoder(c, mLocale);
LogCat: Display language = English
But i get the same result.
Thank You