Localization
When an application needs the internationalized functions working under _MBCS or _UNICODE settings, the application developer must set the locale in the application.
You can set the locale dynamically in your application based on the Windows locale setting as follows:
//*** Get User Locale Info.
lcid = GetUserDefaultLCID(); // get locale ID here
GetLocaleInfo( lcid, LOCALE_SABBREVLANGNAME, m_lpszLangU, 4);
GetLocaleInfo( lcid, LOCALE_SENGLANGUAGE, m_lpszLangEng, 20);
//setlocale(LC_ALL, "target_language");
setlocale(LC_ALL, m_lpszLangEng);