Index: src/plugin/PluginSystem.cpp |
=================================================================== |
--- a/src/plugin/PluginSystem.cpp |
+++ b/src/plugin/PluginSystem.cpp |
@@ -58,39 +58,36 @@ |
return system; |
} |
-CString CPluginSystem::GetBrowserLanguage() const |
+std::wstring CPluginSystem::GetBrowserLanguage() const |
{ |
LANGID lcid = ::GetUserDefaultLangID(); |
- TCHAR language[128]; |
+ wchar_t language[128]; |
memset(language, 0, sizeof(language)); |
- TCHAR country[128]; |
+ wchar_t country[128]; |
memset(language, 0, sizeof(country)); |
- CString lang; |
+ std::wstring lang; |
int res = ::GetLocaleInfo(lcid, LOCALE_SISO639LANGNAME, language, 127); |
if (res == 0) |
{ |
- DEBUG_ERROR_LOG(::GetLastError(), PLUGIN_ERROR_SYSINFO, PLUGIN_ERROR_SYSINFO_BROWSER_LANGUAGE, "System::GetBrowserLang - Failed"); |
+ DEBUG_ERROR_LOG(::GetLastError(), PLUGIN_ERROR_SYSINFO, PLUGIN_ERROR_SYSINFO_BROWSER_LANGUAGE, L"System::GetBrowserLang - Failed"); |
} |
else |
{ |
- lang.Append(language); |
+ lang +=language ; |
} |
- |
- lang.Append(L"-"); |
- |
+ lang += L"-"; |
res = ::GetLocaleInfo(lcid, LOCALE_SISO3166CTRYNAME, country, 127); |
if (res == 0) |
{ |
- DEBUG_ERROR_LOG(::GetLastError(), PLUGIN_ERROR_SYSINFO, PLUGIN_ERROR_SYSINFO_BROWSER_LANGUAGE, "System::GetBrowserLang - failed to retrieve country"); |
+ DEBUG_ERROR_LOG(::GetLastError(), PLUGIN_ERROR_SYSINFO, PLUGIN_ERROR_SYSINFO_BROWSER_LANGUAGE, L"System::GetBrowserLang - failed to retrieve country"); |
} |
else |
{ |
- lang.Append(country); |
+ lang += country; |
} |
- |
return lang; |
} |