/*
* -----
* Screenshot Sender - __language.js
* -----
* Language functions for Screenshot Sender 5
* -----
*/
var __language = function () {
this.IsRtl;
this.UILangCode;
this.Author;
this.Version;
this.Compatibility;
this.Website;
this.text = {};
}
__language.prototype = {
"load" : function (LangId) {
try { var xml = new ActiveXObject('Microsoft.XMLDOM'); xml.async = false; }
catch (e) {
try { var xml = new ActiveXObject('MSXML2.DOMDocument'); xml.async = false; }
catch (e) { return false; } };
xml.load(MsgPlus.ScriptFilesPath + '\\Languages\\' + LangId + '\\' + LangId + '.xml');
this.UILangCode = LangId;
this.Author = xml.selectSingleNode('//Translation/About/Author').text;
this.Version = xml.selectSingleNode('//Translation/About/Version').text;
this.Compatibility = xml.selectSingleNode('//Translation/About/Compatibility').text;
this.Website = xml.selectSingleNode('//Translation/About/Website').text;
this.IsRtl = parseInt(xml.selectSingleNode('//Translation/About/Rtl').text) === 1;
var nodes = xml.selectNodes('/Translation/String');
for (i=0; i<nodes.length; ++i)
this.text[nodes[i].getAttribute('Id')] = nodes[i].text;
}
}