Created
September 28, 2011 12:53
-
-
Save tiesmaster/1247854 to your computer and use it in GitHub Desktop.
Retrieve the default user locale on Windows
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <windows.h> | |
#include <stdio.h> | |
void main() { | |
char locale_name[32]; | |
if (GetLocaleInfo (LOCALE_USER_DEFAULT, | |
LOCALE_SABBREVLANGNAME | LOCALE_USE_CP_ACP, | |
locale_name, sizeof (locale_name))) | |
{ | |
printf("%s\n", locale_name); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment