code: function(code) {
          var lang;
          if(!code) {
              code = (OpenLayers.BROWSER_NAME == "msie") ?
                  navigator.userLanguage : navigator.language;
          }
          var parts = code.split('-');
          parts[0] = parts[0].toLowerCase();
          if(typeof OpenLayers.Lang[parts[0]] == "object") {
              lang = parts[0];
          }
  
          // check for regional extensions
          if(parts[1]) {
              var testLang = parts[0] + '-' + parts[1].toUpperCase();
              if(typeof OpenLayers.Lang[testLang] == "object") {
                  lang = testLang;
              }
          }
          if(!lang) {
              OpenLayers.Console.warn(
                  'Failed to find OpenLayers.Lang.' + parts.join("-") +
                  ' dictionary, falling back to default language'
              );
              lang = OpenLayers.Lang.defaultCode;
          }
          
          OpenLayers.Lang.code = lang;
      }
docs: APIFunction: setCode
  Set the language code for string translation.  This code is used by
  the <OpenLayers.Lang.translate> method.
  
  Parameters:
  code - {String} These codes follow the IETF recommendations at
  http://www.ietf.org/rfc/rfc3066.txt.  If no value is set, the
  browser's language setting will be tested.  If no <OpenLayers.Lang>
  dictionary exists for the code, the <OpenLayers.String.defaultLang>
  will be used.