mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
fix textOrientation value (#4805)
This commit is contained in:
committed by
Eugenio Romano
parent
5392f3d229
commit
148f9830aa
@@ -70,7 +70,7 @@ export class UserPreferencesService {
|
||||
const locale = this.locale || this.getDefaultLocale();
|
||||
|
||||
this.setWithoutStore(UserPreferenceValues.Locale, locale);
|
||||
this.setWithoutStore('textOrientation', (this.locale || this.getDefaultLocale()));
|
||||
this.setWithoutStore('textOrientation', this.getLanguageByKey(locale).direction || 'ltr');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -225,7 +225,7 @@ export class UserPreferencesService {
|
||||
private getLanguageByKey(key: string): LanguageItem {
|
||||
return (
|
||||
this.appConfig
|
||||
.get<Array<LanguageItem>>(AppConfigValues.APP_CONFIG_LANGUAGES_KEY)
|
||||
.get<Array<LanguageItem>>(AppConfigValues.APP_CONFIG_LANGUAGES_KEY, [<LanguageItem> { key: 'en' }])
|
||||
.find((language) => key.includes(language.key)) || <LanguageItem> { key: 'en' }
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user