Interface LocaleService

  • All Known Implementing Classes:
    LocaleServiceImpl

    @NonNullByDefault
    public interface LocaleService
    Provides helper method for working with locales.
    Author:
    Lyubomir Papazov - Initial contribution
    • Method Detail

      • getLocale

        Locale getLocale​(@Nullable String acceptLanguageHttpHeader)
        Returns the locale in respect to the given "Accept-Language" HTTP header.
        Parameters:
        language - value of the "Accept-Language" HTTP header (can be null).
        Returns:
        Locale for the "Accept-Language" HTTP header or default locale if header is not set or can not be parsed.