从 c# 检测操作系统语言 [英] detect os language from c#

查看:38
本文介绍了从 c# 检测操作系统语言的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法从 c# 类中检测操作系统的语言?

Is there a way to detect the Language of the OS from within a c# class?

推荐答案

使用 System.Globalization.CultureInfo 类,您可以确定您想要什么.

With the System.Globalization.CultureInfo class you can determine what you want.

CultureInfo.CurrentCulture 获得系统设置文化,CultureInfo.CurrentUICulture 获得用户设置文化.

With CultureInfo.CurrentCulture you get the system set culture, with CultureInfo.CurrentUICulture you get the user set culture.

这篇关于从 c# 检测操作系统语言的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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