Why isn't there a culture enum?

前端 未结 4 1943
执笔经年
执笔经年 2021-02-20 18:20

Greetings,

I was wondering why there isn\'t a pre-set enum for cultures in C#? Since the cultures never change and are always like \"nl-NL, en-GB, en-US\".. why not make

4条回答
  •  执念已碎
    2021-02-20 19:07

    "Since the cultures never change"

    Don't they? This article (Microsoft .NET Framework 4: What is New in Globalization) disagrees. In the past 5 years alone, a lot has changed in the region of Serbia for example, leading to new Cultures.

    In the real world, the globalization information is constantly changing because of cultural developments in the local markets, because of new standards which update the culture sensitive information frequently, or because Microsoft finds more accurate information about different markets or expands into more markets.

    Microsoft .NET Framework 4 supports a minimum of 354 cultures compared to a minimum of 203 cultures in the previous release. Many of those cultures are neutrals that were added to complete the parent chain to the root neutral culture.

    For example, three Inuktitut neutrals were added to the already existing cultures Inuktitut (Syllabics, Canada) and Inuktitut (Latin, Canada)

    Also, I guess an enum itself does not make sense. A CultureInfo is much more than just a name, and a lookup offers more flexibility and independence from any political changes, of which there are many more than we usually realize.

提交回复
热议问题