docs: function(href, switchLang) {
              var controllerProps = controller.getProps(),
                  view, staticView, title, questionmark, staticURI, requireId, componentId,
              lang, langFromURI, secondSlash, possibleLang, hashPos, hash;
              questionmark = href.indexOf('\?');
              staticURI = (questionmark===-1);
              staticURI || (href=href.substr(0, questionmark));
              // inspect whether the uri starts with a valid language
              secondSlash = href.indexOf('/', 2);
  
              if ((secondSlash!==-1) && (href[0]==='/')) {
                  // possible language in the uri
                  var validLanguages = controllerProps.__languages; // is an object
                  possibleLang = href.substr(1, secondSlash-1);
                  if (validLanguages[possibleLang]) {
                      // yes it is a language
                      langFromURI = possibleLang;
                      href = href.substr(secondSlash);
                  }
              }
              // check for hashtags:
              hashPos = href.indexOf('#');
              if (hashPos!==-1) {
                  hash = href.substr(hashPos+1);
                  href = href.substr(0, hashPos);
              }
              href || (href=WINDOW.location.pathname);
              this.routes.some(function(route) {
                  var path = '^'+route.path.replace(REGEXP_PLACEHOLDER, '((?!\/).)+')+'\/?$',
                      reg = new RegExp(path);
                  if (reg.test(href)) {
                      view = route.view;
                      staticView = staticURI ? route.staticView : false;
                      title = route.title;
                  }
                  return view;
              });
              controllerProps.__routes.some(function(route) {
                  if (route.view===view) {
                      requireId = route.requireId;
                      componentId = route.componentId;
                  }
                  return componentId;
              });
              lang = (switchLang && switchLang.toLowerCase()) || langFromURI || controllerProps.__lang;
              return {
                  view: view,
                  staticView: staticView,
                  title: (title && title[lang]) || '',
                  requireId: requireId,
                  componentId: componentId,
                  lang: lang,
                  langPrefix: !langFromURI && controllerProps.__langprefix,
                  hash: hash
              };
          }