Class AcceptLanguageLocaleHandler

All Implemented Interfaces:
LocaleHandler
Direct Known Subclasses:
AbstractStoredLocaleHandler

public abstract class AcceptLanguageLocaleHandler extends RequestLocaleHandler
Resolves locale by first checking the request-only parameter and then falling back to the browser's Accept-Language header.

When a supportedLocale set is configured, only Accept-Language values present in that set are accepted. When the set is empty (the default), the first locale advertised by the browser is returned as-is.

See Also:
  • Constructor Details

    • AcceptLanguageLocaleHandler

      protected AcceptLanguageLocaleHandler(ActionInvocation invocation, String requestOnlyParameterName, Set<Locale> supportedLocale)
  • Method Details