diff --git a/packages/core/src/I18n/I18n.ts b/packages/core/src/I18n/I18n.ts index 9a20007a02f..1baafbcc3bf 100644 --- a/packages/core/src/I18n/I18n.ts +++ b/packages/core/src/I18n/I18n.ts @@ -78,14 +78,14 @@ export class I18n { const lang = this._lang; let val = this.getByLanguage(key, lang); - if (val) { + if (val !== undefined) { return val; } if (lang.indexOf('-') > 0) { val = this.getByLanguage(key, lang.split('-')[0]); } - if (val) { + if (val !== undefined) { return val; } @@ -105,7 +105,7 @@ export class I18n { } const lang_dict = this._dict[language]; - if (!lang_dict) { + if (typeof lang_dict === 'undefined') { return defVal; }