fixed hebrew language string and introducing fallback to english if wrong language is set

v1.18.x
Julian Lam 11 years ago
parent 90cd46815a
commit 7d736f9352

@ -1,4 +1,4 @@
{
"name": "עברית (ישראל)",
"code": "he_IL"
"code": "he"
}

@ -201,9 +201,15 @@
Meta = require('../../src/meta'),
path = require('path'),
fs = require('fs'),
winston = require('winston');
winston = require('winston'),
language = Meta.config.defaultLang;
utils.walk(path.join(__dirname, '../language', (Meta.config.defaultLang || 'en_GB')), function (err, data) {
if (!fs.existsSync(path.join(__dirname, '../language', language))) {
winston.warn('[translator] Language \'' + Meta.config.defaultLang + '\' not found. Defaulting to \'en_GB\'');
language = 'en_GB';
}
utils.walk(path.join(__dirname, '../language', language), function (err, data) {
var loaded = data.length;
for (var d in data) {

Loading…
Cancel
Save