如果安装任何从右到左的语言检测语言、右到左

由网友(訷仕笵êr█)分享简介:什么是检测任何从右到左的语言是否被安装在主机上的最简单的方法Windows操作系统?What is the easiest way to detect whether any right-to-left language is installed on the host Windows OS?(我需要这个,才能知道...

什么是检测任何从右到左的语言是否被安装在主机上的最简单的方法Windows操作系统?

What is the easiest way to detect whether any right-to-left language is installed on the host Windows OS?

(我需要这个,才能知道是否LTR标记将显示为正方形,或在主机操作系统上正常工作)

(I need this in order to know if LTR marks will be displayed as squares, or work properly on the host OS)

推荐答案

大概非托管API类似的 IsValidLanguageGroup , IsValidLocaleName (或的 IsValidLocale )或者 IsValid的codePAGE 是你在找什么

Probably unmanaged API like IsValidLanguageGroup, IsValidLocaleName (or IsValidLocale) or IsValidCodePage is what you are looking for

例如,code

if (IsValidLanguageGroup (LGRPID_ARABIC, LGRPID_INSTALLED) ||
    IsValidLanguageGroup (LGRPID_TURKIC, LGRPID_INSTALLED) || 
    IsValidLanguageGroup (LGRPID_HEBREW, LGRPID_INSTALLED)) {
    // RTL is supported 
}

可以用来测试你是否有至少从两个最知名从右到左(RTL)安装在Windows计算机上的语言。我不知道相应的.NET API,但可能 CultureInfo.GetCultures 可以在你的情况下使用。

can be used to test whether you have at least one from two most known right-to-left (RTL) languages installed on the windows computer. I don't know the corresponding .NET API, but probably CultureInfo.GetCultures could be used in your case.

更新时间::我包含在语言组进行测试的名单泰语组,但我不知道,任何的这种语言,你真正需要的。通常情况下,你的应用程序仅支持选定的语言。

UPDATED: I included Thai language group in the list of language groups for testing, but I am not sure, that any of this languages you really need. Typically you application supports only selected languages.

阅读全文

相关推荐

最新文章