Code Viewer

./Classes/__language.js File Size: 2.41 KB

  1. /*
  2. * -----
  3. * Screenshot Sender - __language.js
  4. * -----
  5. * Language functions for Screenshot Sender 5
  6. * -----
  7. */
  8.  
  9. var __language = function () {
  10.         this.IsRtl;
  11.         this.UILangCode;
  12.         this.Author;
  13.         this.Version;
  14.         this.Compatibility;
  15.         this.Website;
  16.         this.text = {};
  17. }
  18.  
  19. __language.prototype = {
  20.         "load" : function (LangId) {
  21.                 try { var xml = new ActiveXObject('Microsoft.XMLDOM'); xml.async = false; }
  22.                         catch (e) {
  23.                 try { var xml = new ActiveXObject('MSXML2.DOMDocument'); xml.async = false; }
  24.                         catch (e) { return false; } };
  25.                 xml.load(MsgPlus.ScriptFilesPath + '\\Languages\\' + LangId + '\\' + LangId + '.xml');
  26.                 this.UILangCode = LangId;
  27.                 this.Author = xml.selectSingleNode('//Translation/About/Author').text;
  28.                 this.Version = xml.selectSingleNode('//Translation/About/Version').text;
  29.                 this.Compatibility = xml.selectSingleNode('//Translation/About/Compatibility').text;
  30.                 this.Website = xml.selectSingleNode('//Translation/About/Website').text;
  31.                 this.IsRtl = parseInt(xml.selectSingleNode('//Translation/About/Rtl').text) === 1;
  32.                
  33.                 var nodes = xml.selectNodes('/Translation/String');
  34.                 for (i=0; i<nodes.length; ++i)
  35.                         this.text[nodes[i].getAttribute('Id')] = nodes[i].text;
  36.         }
  37. }

Version

  • 5.0.0070_20100325_publicbeta1

Developers

Project Details

  • Folders8
  • Files122
  • Total Lines11,867
  • Repository Version70

User Count

  • 162