Package io.micronaut.core.util.locale
Class FixedLocaleResolver<T>
java.lang.Object
io.micronaut.core.util.locale.FixedLocaleResolver<T>
- Type Parameters:
T
- The context object which will be used to resolve the locale
- All Implemented Interfaces:
Ordered
,LocaleResolver<T>
- Direct Known Subclasses:
HttpFixedLocaleResolver
Generic implementation of
LocaleResolver
for fixed locale resolution.- Since:
- 2.3.0
- Author:
- Sergio del Amo
-
Field Details
-
locale
-
-
Constructor Details
-
FixedLocaleResolver
- Parameters:
locale
- fixed locale
-
-
Method Details
-
resolve
Description copied from interface:LocaleResolver
Resolves the locale for the given context.- Specified by:
resolve
in interfaceLocaleResolver<T>
- Parameters:
context
- The context to retrieve the locale from- Returns:
- The locale
-
resolveOrDefault
Description copied from interface:LocaleResolver
Resolves the local or returns the default locale.- Specified by:
resolveOrDefault
in interfaceLocaleResolver<T>
- Parameters:
context
- The context- Returns:
- The locale
-