Package org.apache.sling.i18n
Interface RequestLocaleResolver
-
- All Known Implementing Classes:
DefaultLocaleResolver
public interface RequestLocaleResolver
TheRequestLocaleResolver
service interface may be implemented by a service registered under this name to allow the resolution of the requestLocale
to apply.This interface is intended to be implemented by providers knowing how to resolve one or more
Locale
s applicable to handle the request.Only a single
RequestLocaleResolver
service is currently used.- Since:
- 2.2
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.List<java.util.Locale>
resolveLocale(HttpServletRequest request)
Return a non-null
but possibly empty list ofLocale
instances to consider for localization of the current request.
-
-
-
Method Detail
-
resolveLocale
java.util.List<java.util.Locale> resolveLocale(HttpServletRequest request)
Return a non-null
but possibly empty list ofLocale
instances to consider for localization of the current request. The list returned is assumed to be ordered by preference where the first entry is the preferredLocale
and the last entry is the least preferredLocale
.Returning an empty list is equivalent to returning a singleton list whose single entry is the
ResourceBundleProvider.getDefaultLocale()
.- Parameters:
request
- TheHttpServletRequest
providing hints and information for theLocale
resolution.- Returns:
- The list of
Locale
s to use for internationalization of request processing
-
-