Forum Xamarin.Forms

Set Default Culture To Culture Of Device

MelbourneDeveloperMelbourneDeveloper AUMember ✭✭✭
edited August 2017 in Xamarin.Forms


The default culture of the app should default to the culture of the device.

API Changes

Put this line of code somewhere in the startup of all Xamarin apps:

CultureInfo.DefaultThreadCurrentCulture = new CultureInfo(CultureInfo.CurrentUICulture.ToString());

Intended Use Case

Using a Xamarin App.

Note: If this code isn't added, the culture will default to en-US which has the whacky date format that everyone complains about.

Open · Last Updated


Sign In or Register to comment.