summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerdisplayname.cpp
diff options
context:
space:
mode:
authorJames Cook <james@lindenlab.com>2010-04-29 17:13:56 -0700
committerJames Cook <james@lindenlab.com>2010-04-29 17:13:56 -0700
commitda723c27ca4cdd402af81a0b6f2545334119b98c (patch)
tree4554f3bd539156ec1449bd6334dfa4392b18e16e /indra/newview/llviewerdisplayname.cpp
parent781c76e85c732ba710e655afcdd5c5441d10b341 (diff)
Send Accept-Language header to localize set-display-name error msgs
Diffstat (limited to 'indra/newview/llviewerdisplayname.cpp')
-rw-r--r--indra/newview/llviewerdisplayname.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/indra/newview/llviewerdisplayname.cpp b/indra/newview/llviewerdisplayname.cpp
index beb1dc9c82..a6ac2587db 100644
--- a/indra/newview/llviewerdisplayname.cpp
+++ b/indra/newview/llviewerdisplayname.cpp
@@ -43,6 +43,7 @@
#include "llhttpclient.h"
#include "llhttpnode.h"
#include "llnotificationsutil.h"
+#include "llui.h" // getLanguage()
namespace LLViewerDisplayName
{
@@ -75,6 +76,11 @@ void LLViewerDisplayName::set(const std::string& display_name, const set_name_sl
return;
}
+ // People API can return localized error messages. Indicate our
+ // language preference via header.
+ LLSD headers;
+ headers["Accept-Language"] = LLUI::getLanguage();
+
// People API requires both the old and new value to change a variable.
// Our display name will be in cache before the viewer's UI is available
// to request a change, so we can use direct lookup without callback.
@@ -100,7 +106,7 @@ void LLViewerDisplayName::set(const std::string& display_name, const set_name_sl
// communicates with the back-end.
LLSD body;
body["display_name"] = change_array;
- LLHTTPClient::post(cap_url, body, new LLSetDisplayNameResponder);
+ LLHTTPClient::post(cap_url, body, new LLSetDisplayNameResponder, headers);
}
class LLSetDisplayNameReply : public LLHTTPNode