runtime: CultureInfo.GetCultures missing in .NET Core
We’re currently building out the support for language resources and i18n/l10n in ASP.NET 5/DNX and we’re wondering why there doesn’t appear to be a way to retrieve a list of all available cultures in .NET Core. Right now it appears our only option for determining if a culture string is valid is to attempt to create a CultureInfo
object from it using the CultureInfo(string name)
ctor, and catching the resulting CultureNotFoundException
if it’s indeed invalid. This feels sub-optimal.
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Comments: 32 (25 by maintainers)
Thanks @tarekgh, I have just done so.
It would be great if you could do the same, as I’m sure that feedback from a Microsoft team would be more highly prioritized. 😄
Seems like the sort of thing .NET should do for me though, no? And we’d still need to have a solution for Linux & OSX.