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

change current_locale to getCurrentLocale

This commit is contained in:
Hiroyasu Nishiyama 2018-05-30 20:32:56 +09:00
parent 0ad54cc2d1
commit de43148341

View File

@ -81,7 +81,7 @@ var MessageFileLoader = {
} }
function current_locale() { function getCurrentLocale() {
var env = process.env; var env = process.env;
for (var name of ['LC_ALL', 'LC_MESSAGES', 'LANG']) { for (var name of ['LC_ALL', 'LC_MESSAGES', 'LANG']) {
if (name in env) { if (name in env) {
@ -102,7 +102,7 @@ function init() {
}, },
fallbackLng: [defaultLang] fallbackLng: [defaultLang]
}; };
var lang = current_locale(); var lang = getCurrentLocale();
if (lang) { if (lang) {
opt.lng = lang; opt.lng = lang;
} }