Interface LocaleResolver

    • Method Detail

      • resolveLocale

        Locale resolveLocale​(HttpServletRequest request)
        Resolve the current locale via the given request. Can return a default locale as fallback in any case.
        Parameters:
        request - the request to resolve the locale for
        Returns:
        the current locale (never null)
      • setLocale

        void setLocale​(HttpServletRequest request,
                       HttpServletResponse response,
                       Locale locale)
        Set the current locale to the given one.
        Parameters:
        request - the request to be used for locale modification
        response - the response to be used for locale modification
        locale - the new locale, or null to clear the locale
        Throws:
        UnsupportedOperationException - if the LocaleResolver implementation does not support dynamic changing of the locale