Why not rename the culture?

Hi,

I was wondering why in C # there is no predefined enumeration for cultures? Since cultures never change and always resemble "nl-NL, en-GB, en-US" .. why not make an enumeration in order to make things a little easier?

[edit]

As indicated, cultures are changing ... but not all. Why not create an enum / class type that contains all cultures and makes it possible to add / change them?

+8
c # cultureinfo
source share
4 answers

"Because cultures never change."

Is not it? This article (Microsoft.NET Framework 4: What's New in Globalization) disagrees. Only in the last 5 years in the region of Serbia, for example, much has changed, which has led to the emergence of new cultures.

In the real world, globalization information is constantly changing due to cultural events in local markets, due to new standards that often update culturally sensitive information, or because Microsoft finds more accurate information about different markets or expands to new markets.

Microsoft.NET Framework 4 supports a minimum of 354 cultures compared to a minimum of 203 cultures in the previous release. Many of these cultures are neutral, which have been added to complete the parent chain to an indigenous neutral culture.

For example, three inuktitut neutrals were added to the existing cultures of Inuktitut (Syllabics, Canada) and Inuktitut (lat., Canada)

In addition, I think that enumeration alone does not make sense. Cultural information is more than just a name, and the search provides more flexibility and independence from any political changes, which are much more than we usually understand.

+15
source share

Enumerations are committed at compile time.

But the set of cultures changes at runtime:

  • Different OS versions support different cultures.
  • OS updates (service packs, language interface packs, ...) can add cultures
  • Later versions of .NET support more cultures (building an assembly for one version and using it with another).
+7
source share

They change, albeit slowly. In any case, they precede C #, so including them in an enumeration at that moment will be kludgery. Just like the POSIX system calls the enumeration I made in postForth, but knew that it was wrong when I did it.

+3
source share

In addition to them, as suggested by others, you can create your own cultures , and they will be explicitly absent from the enumeration, since you cannot add elements to it.

+2
source share

All Articles