Microsoft sublanguage string to locale identifier

Posted by Jacob on Stack Overflow See other posts from Stack Overflow or by Jacob
Published on 2010-06-11T03:14:25Z Indexed on 2010/06/11 3:23 UTC
Read the original article Hit count: 269

Filed under:
|
|
|

I can't seem to find a way to convert, or find, a local identifier from a sublanguage string. This site shows the mappings:

http://msdn.microsoft.com/en-us/library/dd318693(v=VS.85).aspx

I want the user to enter a sublanguage string, such as "France (FR)" and to get the local identifier from this, which in this case would be 0x0484. Or the other way around, if a user enters 0x0480 then to return French (FR).

Has anyone encountered this problem before and can point me in the right direction?

Otherwise I'm going to be writing a few mapping statements to hard code it and maintain future releases if anything changes.

BTW, I'm coding in C++ for Windows platform. Cheers

© Stack Overflow or respective owner

Related posts about c++

Related posts about Microsoft