Package io.micronaut.core.util
Interface LocaleResolver<T>
-
- Type Parameters:
T
- The context object which will be used to resolve the locale
- All Superinterfaces:
Ordered
- All Known Implementing Classes:
AbstractLocaleResolver
,FixedLocaleResolver
public interface LocaleResolver<T> extends Ordered
Responsible for determining the current locale given a context.- Since:
- 2.3.0
-
-
Field Summary
-
Fields inherited from interface io.micronaut.core.order.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.Optional<java.util.Locale>
resolve(T context)
Resolves the locale for the given context.java.util.Locale
resolveOrDefault(T context)
Resolves the local or returns the default locale.
-