获得在不同的语言系统时区 [英] Getting system Timezones in different languages

查看:286
本文介绍了获得在不同的语言系统时区的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前得到所有时区的列表是这样的:

I'm currently getting the list of all timezones like this:

var TheListOfAllTimezones = TimeZoneInfo.GetSystemTimeZones();

因此​​,举例来说,在巴黎的时区有 W的显示名称属性。欧洲标准时间。现在我该怎样得到这个名单另一种语言?例如,对于在法国的用户,我想显示 HEURE欧洲DE L'Ouest的

感谢。

推荐答案

更改为信息来自在的CurrentCulture 不起作用注册表(XP)或从多语言用户界面(MUI)DLL(Vista中,Windows 7)。

Changing the CurrentCulture doesn't work as the information comes from the registry (XP) or from the Multilingual User Interface (MUI) DLL (Vista, Windows 7).

在Vista或Windows 7,您可以安装其他语言和更改显示语言(的区域和语言的 - > 键盘和语言的 - > 显示语言)。需要重新启动计算机。这一点,不仅如此,实际上会改变的TimeZoneInfo 使用的语言。

On Vista or Windows 7, you may install other languages and change the display language (Region and Language -> Keyboards and languages -> Display language). A reboot is required. This, and only this, will actually change the language used in TimeZoneInfo.

在Windows 7中,只有旗舰版和企业允许其他语言的安装 - 通过安装方式的多语言用户界面包

On Windows 7, only Ultimate and Enterprise allow the installation of other languages - by means of installing Multilingual User Interface Packs.

一旦你安装了其他语言,你应该能够找到的DLL中的 SYSTEM32 的文件夹(找 tzres​​ ),也许出口资源与Visual Studio。

Once you installed other languages, you should be able to find the DLLs in the system32 folder (look for tzres) and maybe export the resources with Visual Studio.

至于可信/官方渠道 - 怎么样<一个href=\"http://blogs.msdn.com/b/bclteam/archive/2007/06/07/exploring-windows-time-zones-with-system-timezoneinfo-josh-free.aspx\">an在BCL团队的MSDN文章的:

As to credible/official sources - how about an article on msdn of the BCL Team:

...显示字符串加载无论是从多语言用户
  界面(MUI)DLL
,tzres​​.dll,或直从注册表,当
  MUI支持是不可用。启用MUI的操作系统,如
  Windows Vista中包含 MUI_Display MUI_Std MUI_Dlt 键,哪一个
  由操作系统区域设置间接控制。
  在低级别的平台,如Windows XP和Windows Server 2003,
  只有显示标准,存在和 DLT 键。 显示标准 DLT
  键值本地化仅在操作的默认语言
  系统

...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 contain MUI_Display, MUI_Std, and MUI_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 the Display, Std, and Dlt keys exist. The Display, Std, and Dlt key values are localized only in the default language of the operating system.

所以,他们怎么写的CurrentUICulture

由于Windows时区注册表结构,
  的CurrentUICulture设置不会影响这些值
  的TimeZoneInfo性质

Because of the Windows time zone registry architecture, CurrentUICulture settings do not impact the values of these TimeZoneInfo properties.

这篇关于获得在不同的语言系统时区的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆