code: function getLocaleFrom(req, locales) {
        if (!options.path && (!req || !req.path)) return false;
  
        // simplified and more general (bigger) pattern than the following spec:
        // http://www.ietf.org/rfc/rfc1766.txt  				(obsolete)
        // http://www.rfc-editor.org/rfc/rfc4647.txt 		(fallback Page 11)
        // http://www.rfc-editor.org/rfc/rfc5646.txt 		(blabla)
        // http://www.rfc-editor.org/rfc/bcp/bcp47.txt 	(case insensitive Page 5; definition: Page 3-5)
        // regex: /^\/([a-zA-Z]{1,3}(?:-(?:[a-zA-Z0-9]{2,8}))*)\//
        var path = typeof options.path === 'function' ? options.path(req) : req.path;
        if (pattern.test(path)) {
          var locale = RegExp.$1;
          return locale;
        }
        return false;
      }
docs: gets the locale from the given strategy
  
  @param {Object} req              connect / express request object
  @param {Array} locales           locale definition Array.
  @return {Object|String|false}    Object: if it was previously stored, String: if the locale was found with the given Strategy, Boolean:false otherwise.