mirror of
https://github.com/the-djmaze/snappymail.git
synced 2024-11-10 17:13:38 +08:00
18 lines
549 B
JavaScript
18 lines
549 B
JavaScript
import ko from 'ko';
|
|
import { Settings, SettingsGet } from 'Common/Globals';
|
|
import { isArray } from 'Common/Utils';
|
|
|
|
export const LanguageStore = {
|
|
language: ko.observable(''),
|
|
languages: ko.observableArray(),
|
|
userLanguage: ko.observable(''),
|
|
hourCycle: ko.observable(''),
|
|
|
|
populate: function() {
|
|
const aLanguages = Settings.app('languages');
|
|
this.languages(isArray(aLanguages) ? aLanguages : []);
|
|
this.language(SettingsGet('Language'));
|
|
this.userLanguage(SettingsGet('UserLanguage'));
|
|
this.hourCycle(SettingsGet('hourCycle'));
|
|
}
|
|
}
|