Interface LocaleService

All Known Implementing Classes:
LocaleServiceImpl

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

    Modifier and Type
    Method
    Description
    getLocale(@Nullable String acceptLanguageHttpHeader)
    Returns the locale in respect to the given "Accept-Language" HTTP header.
  • Method Details

    • getLocale

      Locale getLocale(@Nullable String acceptLanguageHttpHeader)
      Returns the locale in respect to the given "Accept-Language" HTTP header.
      Parameters:
      acceptLanguageHttpHeader - 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.