mirror of
https://github.com/documize/community.git
synced 2025-08-02 03:55:24 +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
|
@ -100,8 +100,15 @@ export default SimpleAuthSession.extend({
|
|||
}),
|
||||
|
||||
locale: computed('session.content.authenticated.user', function () {
|
||||
if (this.get('session.authenticator') === 'authenticator:anonymous' ||
|
||||
this.get('session.content.authenticated.user.id') === '0' ) {
|
||||
return this.appMeta.locale;
|
||||
}
|
||||
|
||||
let locale = this.get('session.content.authenticated.user.locale');
|
||||
if (_.isUndefined(locale) || locale === "") return this.appMeta.locale;
|
||||
|
||||
return locale;
|
||||
}),
|
||||
|
||||
init() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue