Interface LocaleResolver<T>

Type Parameters:
T - The context object which will be used to resolve the locale
All Superinterfaces:
Ordered
All Known Subinterfaces:
HttpLocaleResolver
All Known Implementing Classes:
AbstractLocaleResolver, CompositeHttpLocaleResolver, CookieLocaleResolver, FixedLocaleResolver, HttpAbstractLocaleResolver, HttpFixedLocaleResolver, RequestLocaleResolver

public interface LocaleResolver<T> extends Ordered
Responsible for determining the current locale given a context.
Since:
2.3.0
Author:
James Kleeh
  • Method Details

    • resolve

      Resolves the locale for the given context.
      Parameters:
      context - The context to retrieve the locale from
      Returns:
      The locale
    • resolveOrDefault

      @NonNull @NonNull Locale resolveOrDefault(@NonNull T context)
      Resolves the local or returns the default locale.
      Parameters:
      context - The context
      Returns:
      The locale