Make your own free website on Tripod.com
 
« November 2006 »
S M T W T F S
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30
You are not logged in. Log in

Programming Tips
Monday, 27 November 2006
How to retrieve language name and country name from a Language ID
Mood:  happy
Topic: VC++

Ever wondered how to get language name and country name from a given language id like 1033.

Well this is how we do  it...

TCHAR szBuffer[MAX_PATH] = { 0 };

// Get language name, for eg: English  
GetLocaleInfo( MAKELCID( 1033, SORT_DEFAULT ), LOCALE_SENGLANGUAGE, szBuffer, MAX_PATH );
MessageBox( szBuffer );

// Get country name, for eg: United states.
GetLocaleInfo( MAKELCID( 1033, SORT_DEFAULT ), LOCALE_SENGCOUNTRY, szBuffer, MAX_PATH );
MessageBox( szBuffer );

JESUS Rulz :))


Posted by Nibu babu thomas at 4:01 PM
Updated: Monday, 27 November 2006 6:25 PM

View Latest Entries