1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Ensure node help is loaded in the right language

Fixes #2195
This commit is contained in:
Nick O'Leary 2019-06-06 14:16:19 +01:00
parent 6b7e623d33
commit 617628b886
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9
2 changed files with 6 additions and 3 deletions

View File

@ -51,7 +51,7 @@ RED.i18n = (function() {
},
loadNodeCatalog: function(namespace,done) {
var languageList = i18n.functions.toLanguages(i18n.detectLanguage());
var languageList = i18n.functions.toLanguages(localStorage.getItem("editor-language")||i18n.detectLanguage());
var toLoad = languageList.length;
languageList.forEach(function(lang) {
$.ajax({
@ -73,7 +73,7 @@ RED.i18n = (function() {
},
loadNodeCatalogs: function(done) {
var languageList = i18n.functions.toLanguages(i18n.detectLanguage());
var languageList = i18n.functions.toLanguages(localStorage.getItem("editor-language")||i18n.detectLanguage());
var toLoad = languageList.length;
languageList.forEach(function(lang) {

View File

@ -107,9 +107,12 @@ var RED = (function() {
}
function loadNodes() {
var lang = localStorage.getItem("editor-language")||i18n.detectLanguage();
$.ajax({
headers: {
"Accept":"text/html"
"Accept":"text/html",
"Accept-Language": lang
},
cache: false,
url: 'nodes',