如何获取Microsoft的语言环境国家/地区缩写名称表 [英] How can i get Locale country abbreviation name table of microsoft
问题描述
大家好,我要使用API GetLocaleInfo(LOCALE_USER_DEFAULT,LOCALE_SABBREVCTRYNAME,lpsz,255)来获取国家/地区缩写名称info.适用于所有国家/地区的3个字母,我无法从msdn库中找到信息,任何人都可以帮助找到它.
我知道它主要来自ISO标准3166,但有些区别在于例如罗马尼亚,ISO标准3166的缩写名称是"ROU",但是带API的缩写名称fom pc是"ROM",我需要知道世界上所有国家/地区的Microsoft的标准定义,这非常重要对我有用,请问有什么可以帮忙找到官方数据的吗?
谢谢与最好的问候
珍妮
Hi,all
I want to use the API GetLocaleInfo(LOCALE_USER_DEFAULT,LOCALE_SABBREVCTRYNAME,lpsz,255) to get the country abbreviation name info.Who can give the micorosoft offical standard data of country abbreviation with 3-letter for all countries, I can not find the info from msdn library,anyone can help to find it.
And i know it is mostly from the ISO Standard 3166,but some is different, for example Romania ,the ISO Standard 3166 abbreviation name is "ROU",but the abbreviation name fom pc with the API is "ROM",i need to known the standard definition of microsoft for all countries in the world, that is very important usefulness for me,can any one help to find the offical data?
Thanks&Best Regards
Jenny
推荐答案
我不知道不知道这些是否是标准"?您指的是,但这就是我所使用的:
I don't know if these are the "standard" you are referring to, but this is what I use:
// Country names
CultureInfo[] allCultures=CultureInfo.GetCultures(CultureTypes.SpecificCultures);
foreach (var c in allCultures)
{
RegionInfo r = new RegionInfo(c.Name);
Debug.WriteLine(r.EnglishName);
Debug.WriteLine(r.DisplayName);
Debug.WriteLine(r.ThreeLetterISORegionName);
}
希望这会有所帮助.
这篇关于如何获取Microsoft的语言环境国家/地区缩写名称表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!