What is the easiest way to detect whether any right-to-left language is installed on the host Windows OS?
(I need this in order to know if LTR marks will be displayed as squares, or work properly on the host OS)
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Probably unmanaged API like IsValidLanguageGroup, IsValidLocaleName (or IsValidLocale) or IsValidCodePage is what you are looking for
For example the code
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.