如何以编程方式检测Windows德语(或芬兰语或瑞典语)版本 [英] How to detect Windows German (or Finnish or Swedish) Version programatically

查看:92
本文介绍了如何以编程方式检测Windows德语(或芬兰语或瑞典语)版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何将正常版本(英语)与其他语言Windows版本区分开来。

我不是在谈论系统区域设置。 Windows通常带有英语,如果需要,我们可以将系统区域设置更改为其他语言。但是还有另一个Windows版本,默认情况下是非英语版本。我想以编程方式检测此类版本。

How can a normal version (English) can be differentiated from another language Windows Version.
I am not talking about system locale. Windows normally comes with English language and if needed we can change system Locale to other language. But there are another Windows Version which by default comes in Non-English language. I want to detect such version programatically.

推荐答案

您可以使用System.Globalization.CultureInfo类获取有关系统语言的信息。

CultureInfo.InstalledUICulture提供操作系统的文化

您可能会觉得有用的其他一些CultureInfo:

CultureInfo.CurrentCulture提供正在运行的线程的文化信息,用于何时你需要了解文化,但没有显示任何内容。

CultureInfo.CurrentUICulture提供在UI上显示内容的文化信息,例如用户所需的DateTime格式。



另请参阅此链接 [ ^ ]用于使用InstalledUICulture的示例。
You can use the System.Globalization.CultureInfo class to get info about the language of the system.
CultureInfo.InstalledUICulture gives the culture of the OS
Some other CultureInfo you may find useful:
CultureInfo.CurrentCulture gives the culture info of the running thread, used when you need to know the culture, but aren’t displaying anything.
CultureInfo.CurrentUICulture gives the culture info for displaying things on the UI, such as the user desired format of DateTime.

Also take a look at this link[^] for an example of using InstalledUICulture.


首先,哟你没有指定任何语言...



看看这里:Locale [ ^ ]和 System.Globalization [ ^ ]。



全球化循序渐进 [ ^ ]

全球化和本地化概述 [ ^ ]
First of all, you did not specify any language...

Have a look here: Locale[^] and System.Globalization[^].

Globalization Step-by-Step[^]
Overview of Globalization and Localization[^]


这篇关于如何以编程方式检测Windows德语(或芬兰语或瑞典语)版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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