Package org.apache.sling.i18n

# Interface LocaleResolver

All Known Implementing Classes:
  `DefaultLocaleResolver`

@Deprecated(since="2.2.0") public interface LocaleResolver
Deprecated.
The `JakartaRequestLocaleResolver` should be used instead.
The `LocaleResolver` 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 `Locale`s applicable to handle the request.

Only a single `LocaleResolver` service is currently used.

## Method Summary

Modifier and Type
Method
Description
`List<Locale>`
`resolveLocale(org.apache.sling.api.SlingHttpServletRequest request)`
Deprecated.
Return a non-`null` but possiby empty list of `Locale` instances to consider for localization of the current request.

## Method Details

### resolveLocale

List<Locale> resolveLocale(org.apache.sling.api.SlingHttpServletRequest request)
Deprecated.
Return a non-`null` but possiby empty list of `Locale` 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 prefered `Locale` and the last entry is the least prefered `Locale`.

Returning an empty list is equivalent to returning a singleton list whose single entry is the `ResourceBundleProvider.getDefaultLocale()`.

Parameters:
  `request` - The `SlingHttpServletRequest` providing hints and information for the `Locale` resolution.
Returns:
  The list of `Locale`s to use for internationalization of request processing