I’m trying to format the date and time on my app based on the users set culture info, however, every help resource I see keeps suggesting that I have to manually enter each culture locale in code. For example, if I wanted en-UK I would have to manually add new CultureInfo(“en-UK”); with something like new CultureInfo(“en-UK”);.
Is there a way to just tap into the currently set culture on the phone without me having to actually type the rtc culture info in? Something that might work like “date = ConvertToLocalCultureFormat(date);”?
I don’t know if this works on WinPhone7, but you could use
which return the name of the CurrentCulture of the current thread (en-UK or whatever your app runs in)
See for refs
However this should not be necessary.
If you convert your datetime to a string in this way:
you should get the conversion in the right CultureInfo of your phone.