Index: Shared/PluginClientBase.cpp |
=================================================================== |
--- a/Shared/PluginClientBase.cpp |
+++ b/Shared/PluginClientBase.cpp |
@@ -89,33 +89,18 @@ |
void CPluginClientBase::SetLocalization() |
{ |
- CPluginDictionary* dic = CPluginDictionary::GetInstance(); |
- |
CPluginSystem* system = CPluginSystem::GetInstance(); |
- |
CString browserLanguage = system->GetBrowserLanguage(); |
+ CPluginDictionary* dic = CPluginDictionary::GetInstance(); |
+ dic->SetLanguage(browserLanguage); |
+ |
CPluginSettings* settings = CPluginSettings::GetInstance(); |
- |
- if (settings->IsMainProcess() && settings->IsMainThread()) |
+ if (settings->IsMainProcess() && settings->IsMainThread() && !settings->Has(SETTING_LANGUAGE)) |
{ |
- if (browserLanguage != settings->GetString(SETTING_LANGUAGE)) |
- { |
- if (dic->IsLanguageSupported(browserLanguage)) |
- { |
- // settings->SetString(SETTING_LANGUAGE, browserLanguage); |
- } |
- } |
- |
- if (!settings->Has(SETTING_LANGUAGE)) |
- { |
- settings->SetString(SETTING_LANGUAGE, "en"); |
- } |
- |
+ settings->SetString(SETTING_LANGUAGE, browserLanguage); |
Oleksandr
2013/03/22 16:04:14
What if we don't have the browser's version in the
Felix Dahlke
2013/03/22 16:09:18
Hehe, I've wondered quite a bit about this actuall
Oleksandr
2013/03/22 16:15:28
It isn't related, but it's not like we can have on
|
settings->Write(); |
} |
- |
- dic->SetLanguage(settings->GetString(SETTING_LANGUAGE)); |
} |