dist/templates/libraries/helpers.js
function setLanguage(language) {
  window[App.pkg.settings.storage_engine || 'localStorage'][App.pkg._id + '-language'] = language;

  var xhr = null;
  var activexmodes = ["Msxml2.XMLHTTP", "Microsoft.XMLHTTP"];
  if(window.ActiveXObject) {
    for(var i = 0; i < activexmodes.length; i++) {
      try {
        xhr = new ActiveXObject(activexmodes[i]);
      } catch(e) {}
    }
  } else {
    xhr = new XMLHttpRequest();
  }
  xhr.open('GET', 'languages/' + language + '.json', false);
  xhr.send(null);

  if(xhr.status == 200 || xhr.status == 201) {
    var response = JSON.parse(xhr.responseText);
    Globalize.culture(language);
    Globalize.addCultureInfo(language, {
      messages: response,
    });
  }
}
function setLanguage(language) {
  window[App.pkg.settings.storage_engine || 'localStorage'][App.pkg._id + '-language'] = language;

  var xhr = null;
  var activexmodes = ["Msxml2.XMLHTTP", "Microsoft.XMLHTTP"];
  if(window.ActiveXObject) {
    for(var i = 0; i < activexmodes.length; i++) {
      try {
        xhr = new ActiveXObject(activexmodes[i]);
      } catch(e) {}
    }
  } else {
    xhr = new XMLHttpRequest();
  }
  xhr.open('GET', 'languages/' + language + '.json', false);
  xhr.send(null);

  if(xhr.status == 200 || xhr.status == 201) {
    var response = JSON.parse(xhr.responseText);
    Globalize.culture(language);
    Globalize.addCultureInfo(language, {
      messages: response,
    });
  }
}
function setLanguage ( language ) { window [ App . pkg . settings . storage_engine || 'localStorage' ] [ App . pkg . _id + '-language' ] = language ; var xhr = null ; var activexmodes = [ "Msxml2.XMLHTTP" , "Microsoft.XMLHTTP" ] ; if ( window . ActiveXObject ) { for ( var i = 0 ; i < activexmodes . length ; i ++ ) { try { xhr = new ActiveXObject ( activexmodes [ i ] ) ; } catch ( e ) { } } } else { xhr = new XMLHttpRequest ( ) ; } xhr . open ( 'GET' , 'languages/' + language + '.json' , false ) ; xhr . send ( null ) ; if ( xhr . status == 200 || xhr . status == 201 ) { var response = JSON . parse ( xhr . responseText ) ; Globalize . culture ( language ) ; Globalize . addCultureInfo ( language , { messages : response , } ) ; } }
Init the I18n with language specified
Init the I18n with language specified