Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In xamarin, how to get the current language of the device for Android?

How could I get the current language of the device in Xamarin (for Android)?

Got the language with context.Resources.Configuration.Locale.Language

like image 656
user769923 Avatar asked Mar 25 '13 15:03

user769923


1 Answers

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.

like image 151
Eric LeVan Avatar answered Oct 12 '22 06:10

Eric LeVan