Forum Xamarin.Forms
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

Set Default Culture To Culture Of Device

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

Summary

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

Posts

Sign In or Register to comment.