summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-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