How to get DayNames from language only in .NET
Posted
by ManniAT
on Stack Overflow
See other posts from Stack Overflow
or by ManniAT
Published on 2010-03-23T14:12:47Z
Indexed on
2010/03/23
14:43 UTC
Read the original article
Hit count: 290
Assume that I only have a country code (en, de, fr) and I need to display the weekdays in this language. I know about RegionInfo and CultureInfo - but I can't find a solution. If I create a country info from (for an example) "en" I have no DateTime info in it. It would also be OK to just take the first matching Region. For an example en-US for en or de-DE for de.
I don't know if there are differences in DayNames but I know there are some for the months. de-DE Februar - de-AT Feber -- anyhow I don't care. Event if it may be "a bit different" (to see Februar instead of Feber) - it is still German.
And that's what I want to achive - get en an write Monday - get de and write Montag...
Is there a way to create a region just from a language code?
© Stack Overflow or respective owner