i have windows 7 machine has had several languages installed using control panel region , language keyboards , languages install/uninstall languages
when change display language using control panel region , language keyboards , languages choose display language displays correctly.
i need read language has been selected. registry entries have found point original language (0409) english - united states not selected language (0404) chinese - taiwan.
does know how find selected language lcid? if can lcid can display language selected in english (which ultimate goal).
edit:
as mark ransom suggested, can use getuserdefaultlcid
int wmain() { lcid lcid = getuserdefaultlcid();//locale_user_default; cout << "lcid: " << lcid << endl; wchar_t buf[100]; if (getlocaleinfo(lcid, locale_ilanguage, buf, 100)) wcout << buf << endl; if (getlocaleinfo(lcid, locale_senglanguage, buf, 100)) wcout << buf << endl; if (getlocaleinfo(lcid, locale_siso639langname, buf, 100)) wcout << buf << endl; return 0; }
output on windows 8:
lcid: 1028 0404 chinese (traditional) zh
also if user changed system's language in middle of program run, wm_inputlangchange
message sent application:
https://msdn.microsoft.com/en-us/library/windows/desktop/ms632629%28v=vs.85%29.aspx