How could I get the current language of the device in Xamarin (for Android)?
Got the language with context.Resources.Configuration.Locale.Language
How could I get the current language of the device in Xamarin (for Android)?
Got the language with context.Resources.Configuration.Locale.Language
Here's a cross platform version I use. Obviously you can pull whatever property you need from CurrentUICulture
.
return CultureInfo.CurrentUICulture.TwoLetterISOLanguageName;
Maybe it will help someone else.
This appears to be what you are looking for: http://androidapi.xamarin.com/?link=T%3aSystem.Globalization.RegionInfo
The RegionInfo class appears to have access for various ways to read that language information and use in your comparisons.
Based on this question, I went to the Xamarin documentation looking for the answer: Get the current language in device