.net - Windows XP 的 CurrentUICulture 的初始值在哪里设置?

标签 .net windows localization currentuiculture

我正在尝试让我的应用程序支持多种语言。例如,我制作了一些附属程序集,现在我想测试应用程序在法国机器上运行时的外观。

在[控制面板->区域和语言选项]中,我可以在区域选项选项卡中选择法语(法国),在高级选项卡中我可以选择法语(法国)。

但这还不足以让我的应用程序认为它是法语。

如果我将此代码添加到我的主要功能的开头,

[STAThreadAttribute]
int main(array<System::String ^> ^args)
{
    CultureInfo^ ci1 = Thread::CurrentThread->CurrentCulture;
    CultureInfo^ ci2 = Thread::CurrentThread->CurrentUICulture;

然后 ci1->Name 是 fr-FR 但 ci2->Name 是 en-US

对我来说不幸的是,对于要使用的法国卫星程序集,CurrentUICulture 是需要 fr-FR 的程序集。

我不想在代码中将 CurrentUICulture 设置为与 CurrentCulture 相同的设置 - 我想使用控制面板或其他方式更改默认值。

我在互联网上看到很多关于如何在 CurrentUICulture 更改时检测事件的帖子,但没有任何内容告诉我如何更改它!

最佳答案

请参阅How To Change the language used to display menus and dialogs in MUI :

Windows MUI makes it easy for users to change the user interface (menus and dialogs) into the language that best suits them. Up to 33 different languages can be installed on the machine by an administrator (any user with administrative privileges) using the muisetup.exe program.

.NET 的 CurrentUICulture 反射(reflect)了这个设置。

关于.net - Windows XP 的 CurrentUICulture 的初始值在哪里设置?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1492974/

相关文章:

.net - BeginInvoke 使用/不使用 MethodInvoker — 有什么不同吗?

c# - 如何使用c#从谷歌驱动器下载文件

c# - 如何找到 ResourceManager 中可用的资源文化?

c# - 如何在 C# 中本地化密码验证?

windows - docker 窗口中的 Docker exec

ruby-on-rails - 最大值(:created_at) does not give the timestamp in local time format

c# - 在我的代码中隐藏继承成员警告消息! - 不知道它来自哪里

c# - 找不到 Entity Framework ADO.NET Sql.Data.Client 提供程序

c++ - 现在 Visual C++ 动态运行时库是 Windows 操作系统的一部分吗?

windows - 如何在 MFC 中获取 CString 宽度(对于 Unicode)?