如何翻译语言的CultureInfo名称 [英] How to translate CultureInfo language names
问题描述
我知道的三种方式获取CultureInfo对象的完整语言名称。
I know of three ways to get a full language name of a CultureInfo object.
CultureInfo.DisplayName
CultureInfo.NativeName
CultureInfo.EnglishName
显示名称给出了安装.NET语言的名字。结果
NativeName给出了CultureInfos的语言的名字。结果
中文名给人的英文名称(令人惊讶的...)
DisplayName gives the name in the installed .net language.
NativeName gives the name in 'CultureInfos' language.
EnglishName gives the name in English (surprisingly...)
因此,对于CultureInfo的去DE这给(在英语安装.NET)结果
德国的结果
德语结果
德国
So for CultureInfo de-DE this gives (on an English .net installation)
German
Deutsch
German
现在我的问题:有没有办法,要求去-DE的另一种语言的语言叫什么名字?例如。我想要去DE在荷兰(这将是'Duits')的语言名称。
Now my question: Is there a way to ask for the language name of de-DE in another language? E.g. I want the language name of de-DE in Dutch (which would be 'Duits').
推荐答案
这功能没有内置在.NET框架
This functionality isn't built into the .NET Framework
也许看谷歌翻译API
这篇关于如何翻译语言的CultureInfo名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!