I am developing a project where I need to automatically determine which user language is used to create content.
We actually use Locale.getDefault().getLanguage() , but this may not be the right choice, because, for istance, I live in Italy, I write content in Italian, but my local language by default on my phone is en_US .
So, I'm sure that perhaps I could identify it from the SIM country (and step back to the user language if the device does not have one), but there is no one-to-one relationship from the country to the language. For istance, the USA has en_US and es_US.
Do you have any suggestions? Should I request the current Locale content from the user?
source share