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

Use browser default language for initial page load

This commit is contained in:
Nick O'Leary 2021-06-14 09:37:14 +01:00
parent 69b9ff69be
commit 2c710736e8
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9

View File

@ -25,7 +25,7 @@ RED.i18n = (function() {
return {
init: function(options, done) {
apiRootUrl = options.apiRootUrl||"";
var preferredLanguage = localStorage.getItem("editor-language");
var preferredLanguage = localStorage.getItem("editor-language") || detectLanguage();
var opts = {
backend: {
loadPath: apiRootUrl+'locales/__ns__?lng=__lng__',