mirror of
https://github.com/the-djmaze/snappymail.git
synced 2025-01-10 00:38:04 +08:00
36 lines
598 B
JavaScript
36 lines
598 B
JavaScript
|
|
||
|
(function () {
|
||
|
|
||
|
'use strict';
|
||
|
|
||
|
var
|
||
|
ko = require('ko'),
|
||
|
|
||
|
Utils = require('Common/Utils'),
|
||
|
|
||
|
Settings = require('Storage/Settings')
|
||
|
;
|
||
|
|
||
|
/**
|
||
|
* @constructor
|
||
|
*/
|
||
|
function LanguageStore()
|
||
|
{
|
||
|
this.languages = ko.observableArray([]);
|
||
|
|
||
|
this.language = ko.observable('')
|
||
|
.extend({'limitedList': this.languages});
|
||
|
}
|
||
|
|
||
|
LanguageStore.prototype.populate = function ()
|
||
|
{
|
||
|
var aLanguages = Settings.settingsGet('Languages');
|
||
|
|
||
|
this.languages(Utils.isArray(aLanguages) ? aLanguages : []);
|
||
|
this.language(Settings.settingsGet('Language'));
|
||
|
};
|
||
|
|
||
|
module.exports = new LanguageStore();
|
||
|
|
||
|
}());
|