Package org.apache.sling.i18n
Interface JakartaRequestLocaleResolver
- All Known Implementing Classes:
DefaultJakartaLocaleResolver
public interface JakartaRequestLocaleResolver
The
JakartaRequestLocaleResolver service interface may be implemented by a
service registered under this name to allow the resolution of the request
Locale to apply.
This interface is intended to be implemented by providers knowing how to
resolve one or more Locales applicable to handle the request.
Only a single JakartaRequestLocaleResolver service is currently used.
- Since:
- 3.0
-
Method Summary
Modifier and TypeMethodDescriptionresolveLocale(jakarta.servlet.http.HttpServletRequest request) Return a non-nullbut possibly empty list ofLocaleinstances to consider for localization of the current request.
-
Method Details
-
resolveLocale
Return a non-nullbut possibly empty list ofLocaleinstances to consider for localization of the current request. The list returned is assumed to be ordered by preference where the first entry is the preferredLocaleand 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- TheHttpServletRequestproviding hints and information for theLocaleresolution.- Returns:
- The list of
Locales to use for internationalization of request processing
-