code: function loadLang() {
    var locale = getParam( 'lang' );
    pageInfo["layout"] = getParam( 'layout' );
    if ( locale == '' ) { locale = "EN"; }
  
    $.i18n( { locale: locale } );
  
    var langMap = 'i18n/'+locale+'.json';
      if( mode == "php"  &&  pageInfo["layout"] != '' ) {
        langMap = "svc/backend/i18n?locale="+locale+'&layout='+pageInfo["layout"];
        $.getJSON( langMap, 
            function( langMapDta ) {
              $.i18n().load( 
                  langMapDta, 
                  locale 
                ).done( 
                  function(){ ajaxOngoing--; } 
                );
            }
        );
      } else {
        // do it static
        $.i18n().load( 
            langMap, 
            locale 
          ).done( 
            function(){ ajaxOngoing--; } 
          );      
      }
  
      $.extend( $.i18n.parser.emitter, {
        // Handle PONGVER keywords
        pongver: function () {
          //alert( "version" )
          return PONGVER;
        }
      } );
  
      /* hook vor init call back to define other i18n extends */
      if (typeof initI18n === "function") { 
          // safe to use the function
        initI18n();
      }
      
    pageInfo["lang"] = locale;
  }
docs: =====================================================================================================