如何获取巴哈马的地区和文化信息?
问题描述:
Country A 2 A 3 Number
----------------------------------------------------------------------
BAHAMAS BS BHS 044
该国已经存在,但我无法从.Net API获取地区和文化信息。如何获取巴哈马的地区和文化信息?
RegionInfo r = new RegionInfo("BS"); or RegionInfo r = new RegionInfo("BSH");
RegionInfo r = new RegionInfo(44)
CultureInfo.GetCultureInfo(44)
问题:如何获取该国的地区和文化信息?
ISO 3166:http://userpage.chemie.fu-berlin.de/diverse/doc/ISO_3166.html
答
这是有趣的,根据Wikipedia,官方语言为英语与Bahmanian Dialect。
在尝试这些,我们得到了以下错误
BHS - the culture is not supported
(由是你的代码有BSH,错字可能)
随着 “BS”,您将获得:
**The region name BS should not correspond to neutral culture; a
specific culture name is required.**
所以我做了一些研究,针对一种特定的文化,结果为there is a language subtag为巴哈马克里奥尔语英语这是“bah”
但是 - 这也产生了:
Culture name 'bah-BS' is not supported.
事实证明,.NET并不支持所有已知的文化区 - 它使用列表here。 (使用3.5链接 - 列表消失在4.0版本 - 可能还没有更新)
谢谢你的回应。 – zzj8704