I want to do this in order to provide the ISO 3166-1 country code and get the name of this country in the current region. For those of you familiar with the iPhone, I have an example of exactly what I want to do:
NSLocale* currentLocale = [NSLocale currentLocale]; NSString* countryName = [currentLocale displayNameForKey:NSLocaleCountryCode value:@"NO"];
In this case, the countryName variable will contain "Norway", given that the iPhone works in the English locale.
What I have understood so far is that to get the current locale in the Android SDK by a simple static method of the Locale class.
Locale currentLocale = Locale.getDefault();
But I'm stuck here ...
source share