mirror of
https://github.com/documize/community.git
synced 2025-07-25 08:09:43 +02:00
Select user language before server language
This commit is contained in:
parent
e81cbad385
commit
7e26c003d6
3 changed files with 13 additions and 3 deletions
|
@ -24,14 +24,15 @@ export default Service.extend({
|
|||
let str = "";
|
||||
|
||||
switch(this.session.locale) {
|
||||
case "fr-FR":
|
||||
str = "";
|
||||
case "en-US":
|
||||
str = this.langs.enUS[key];
|
||||
break;
|
||||
default:
|
||||
str = this.langs.enUS[key];
|
||||
}
|
||||
|
||||
if (_.isUndefined(str)) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log(">>>>>>>>>>>> i18n missed key", key);
|
||||
return `!${key}!`;
|
||||
}
|
||||
|
@ -42,6 +43,8 @@ export default Service.extend({
|
|||
}
|
||||
}
|
||||
|
||||
console.log(this.session.locale);
|
||||
|
||||
return str;
|
||||
},
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue