getLocale(req) {
    const locale =
      (req.query || {})[pageParams.locale] ||
      (req.body || {})[pageParams.locale] ||
      (req.params || {})[pageParams.locale] ||
      (req.headers || {})[pageParamHeaderPrefix + pageParams.locale];
    return locale;
  }
Extracts and returns the locale from an express request.
@param {Object} req The express request.
@returns {String|undefined} The locale, or undefined if no locale was set.