sashoalm
sashoalm

Reputation: 79447

Checking the regional settings

In my app I need to check if the regional settings are russian on the computer it's running on. Also, I need to know if russian keyboard layout is installed.

The intention behind this is to know whether this computer is likely (I don't need to be 100% sure, likely is good enough) to be owned by a russian. The idea is to check if the regional settings are set to russian, and/or if there is a russian keyboard layout installed, as those are both likely to be present in a computer owned by a russian, but unlikely to be present on a computer owned, say, by an american.

Btw it's not really about russian, it's other nationalities I'll check for, I was just using it as an example.

How can I check those?

Upvotes: 2

Views: 1089

Answers (1)

Erik
Erik

Reputation: 91260

National Language Support Functions is a good place to start.

You need to decide which info you want - You can check which locales are existing, installed, system default, user default or active for a thread. GetThreadLocale will tell you the active locale for a thread, GetUserDefaultLCID and GetSystemDefaultLCID will tell you defaults, the EnumSystemLocales function will let you see which locales exist/are installed, or you can use IsValidLocale to check if a specific locale is installed.

Upvotes: 2

Related Questions