Reputation: 675
I use the geocoding package to convert geolocation into an address. Conversion takes place in two ways (in the language used by the device, or in the settings (only English). I want to use the Ukrainian language, even if the device is not in Ukrainian. Does anyone know how to do it? I would like to specify the language of the application as Ukrainian! even if the device language itself is different. Does anyone know how to fix it??
Upvotes: 0
Views: 237
Reputation: 1
Yes you can and it's simple.
Future<void> getCityLocation(double lat, double lon) async {
await setLocaleIdentifier("uk_UA"); //here
List<Placemark> placemarks = await placemarkFromCoordinates(lat, lon,);
Placemark place = placemarks[0];
city.value = place.subLocality ??
place.locality ??
place.administrativeArea ??
place.country ??
"";
}
just add here line.
Upvotes: 0