Why not all countries are presented in CultureInfo.GetCultures()?

前端 未结 3 752
南方客
南方客 2020-12-20 12:39

I am using this standard code for populating list of countries:

static void Main(string[] args)
{
    List cultureList = new List();

    CultureInfo[] cultu         


        
3条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-20 13:11

    I would use CultureTypes.SpecificCultures but it does not answer your question.

    Why there is only subset of world's countries? Well, there are so many of them. Somebody would have to maintain them and it does cost money. I think that's why Microsoft decided to support only the most "popular" ones.

    BTW. You may create your own CultureInfo. Also, I haven't tried, but you can create RegionInfo instance by passing its ISO code in constructor. I am not sure what will happen if there is no matching CultureInfo, though.

提交回复
热议问题