var TheListOfAllTimezones = TimeZoneInfo.GetSystemTimeZones();
因此,例如,巴黎的时区具有W. Europe Standard Time的DisplayName属性.现在我如何用另一种语言获得这个列表?例如,对于法国的用户,我想展示欧洲欧洲之星.
谢谢.
解决方法
在Vista或Windows 7上,您可以安装其他语言并更改显示语言(区域和语言 – >键盘和语言 – >显示语言).需要重新启动.这个只有这样才能实际改变TimeZoneInfo中使用的语言.
在Windows 7上,只有Ultimate和Enterprise允许安装其他语言 – 通过安装多语言用户界面包.
一旦安装了其他语言,您应该能够在system32文件夹中查找DLL(查找tzres),也可以使用Visual Studio导出资源.
至于可信/官方消息来源 – an article on msdn of the BCL Team:
…the display strings are loaded either from the Multilingual User
Interface (MUI) DLL,tzres.dll,or straight from the registry,when
MUI support is unavailable. MUI-enabled operating systems such as
Windows Vista containMUI_Display
,MUI_Std
,andMUI_Dlt
keys,which
are indirectly controlled by the operating systems regional settings.
On down-level platforms such as Windows XP and Windows Server 2003,
only theDisplay
,Std
,andDlt
keys exist. TheDisplay
,andDlt
key values are localized only in the default language of the operating
system.
那么他们写了关于CurrentUICulture?
Because of the Windows time zone registry architecture,
CurrentUICulture settings do not impact the values of these TimeZoneInfo properties.