mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 17:36:08 +08:00
core: support language code for IE
This commit is contained in:
1 parent
510eff9dbb
commit
f4eac56e92
1 file changed
+2
-1
@@ -45,7 +45,8 @@ String.prototype.translate = function translate(...languages: string[]) {
|
||||
return app.i18n.get(this, languages[0]) || app.i18n.get(this, 'en') || this;
|
||||
}
|
||||
for (const language of languages.filter(Boolean)) {
|
||||
const curr = app.i18n.get(this, language) || app.i18n.get(this, language.split('_')[0]);
|
||||
const curr = app.i18n.get(this, language) || app.i18n.get(this, language.split('_')[0])
|
||||
|| app.i18n.get(this, language.split('-')[0]);
|
||||
if (curr) return curr;
|
||||
}
|
||||
return this;
|
||||
|
||||
Reference in new issue
Block a user