user41767
user41767

Reputation: 1217

Finding the current active language on windows

What are the possible solutions for finding the current active language which appears on the Windows language bar ?

Upvotes: 3

Views: 6649

Answers (2)

Jeff Yates
Jeff Yates

Reputation: 62387

You should look at the Multilingual APIs in Win32 as a starting point. It's not entirely obvious from the documentation which call will provide you what you want, but I think the answer may lie with the calls relating to processes and threads, or preferred languages. You may need to do some experimentation to see which calls give the expected result of matching the language bar selection.

I suspect that the best call to try would be GetThreadUILanguage.

Upvotes: 1

RossFabricant
RossFabricant

Reputation: 12492

CultureInfo.CurrentCulture. This has information on the language and culture. If you just want the language name, try CultureInfo.CurrentCulture.ThreeLetterISOLanguageName.

Upvotes: 3

Related Questions