org.springframework.web.servlet

Interface LocaleResolver

    • Method Detail

      • resolveLocale

        java.util.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,
                       @Nullable
                       HttpServletResponse response,
                       @Nullable
                       java.util.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:
        java.lang.UnsupportedOperationException - if the LocaleResolver implementation does not support dynamic changing of the locale