diff options
Diffstat (limited to 'linden/indra/newview/llagentlanguage.cpp')
-rw-r--r-- | linden/indra/newview/llagentlanguage.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/linden/indra/newview/llagentlanguage.cpp b/linden/indra/newview/llagentlanguage.cpp index 5656f76..04703ef 100644 --- a/linden/indra/newview/llagentlanguage.cpp +++ b/linden/indra/newview/llagentlanguage.cpp | |||
@@ -31,13 +31,17 @@ | |||
31 | 31 | ||
32 | #include "llviewerprecompiledheaders.h" | 32 | #include "llviewerprecompiledheaders.h" |
33 | #include "llagentlanguage.h" | 33 | #include "llagentlanguage.h" |
34 | // viewer includes | ||
34 | #include "llagent.h" | 35 | #include "llagent.h" |
35 | #include "llviewercontrol.h" | 36 | #include "llviewercontrol.h" |
36 | #include "llviewerregion.h" | 37 | #include "llviewerregion.h" |
38 | // library includes | ||
39 | #include "llui.h" // getLanguage() | ||
37 | 40 | ||
38 | LLAgentLanguage::LLAgentLanguage() | 41 | LLAgentLanguage::LLAgentLanguage() |
39 | { | 42 | { |
40 | gSavedSettings.getControl("Language")->getSignal()->connect(boost::bind(&update)); | 43 | gSavedSettings.getControl("Language")->getSignal()->connect(boost::bind(&update)); |
44 | gSavedSettings.getControl("InstallLanguage")->getSignal()->connect(boost::bind(&update)); | ||
41 | gSavedSettings.getControl("SystemLanguage")->getSignal()->connect(boost::bind(&update)); | 45 | gSavedSettings.getControl("SystemLanguage")->getSignal()->connect(boost::bind(&update)); |
42 | gSavedSettings.getControl("LanguageIsPublic")->getSignal()->connect(boost::bind(&update)); | 46 | gSavedSettings.getControl("LanguageIsPublic")->getSignal()->connect(boost::bind(&update)); |
43 | } | 47 | } |
@@ -51,9 +55,7 @@ bool LLAgentLanguage::update() | |||
51 | std::string url = gAgent.getRegion()->getCapability("UpdateAgentLanguage"); | 55 | std::string url = gAgent.getRegion()->getCapability("UpdateAgentLanguage"); |
52 | if (!url.empty()) | 56 | if (!url.empty()) |
53 | { | 57 | { |
54 | std::string language = gSavedSettings.getString("Language"); | 58 | std::string language = LLUI::getLanguage(); |
55 | if (language == "default") | ||
56 | language = gSavedSettings.getString("SystemLanguage"); | ||
57 | 59 | ||
58 | body["language"] = language; | 60 | body["language"] = language; |
59 | body["language_is_public"] = gSavedSettings.getBOOL("LanguageIsPublic"); | 61 | body["language_is_public"] = gSavedSettings.getBOOL("LanguageIsPublic"); |
@@ -62,4 +64,3 @@ bool LLAgentLanguage::update() | |||
62 | } | 64 | } |
63 | return true; | 65 | return true; |
64 | } | 66 | } |
65 | |||