Reputation: 1217
What are the possible solutions for finding the current active language which appears on the Windows language bar ?
Upvotes: 3
Views: 6649
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
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