Interface LocaleProvider

All Superinterfaces:
Serializable
All Known Implementing Classes:
DefaultLocaleProvider, StubLocaleProvider

public interface LocaleProvider extends Serializable
Provides access to current localization qualifier to be used inside AbstractItemModel.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns current (session) data locale to be used to read or store localized attribute data.
    getFallbacks(Locale requestedLocale)
    Returns a List with fallback Locales for the given Locale.
    boolean
    Returns true if for the current session the Locale fallback is enabled.
    toDataLocale(Locale external)
    Converts a arbitrary locale instance into one which is allowed to read and write data with.
  • Method Details

    • getCurrentDataLocale

      Locale getCurrentDataLocale()
      Returns current (session) data locale to be used to read or store localized attribute data. May be other than I18NService.getCurrentLocale()!
    • toDataLocale

      Locale toDataLocale(Locale external)
      Converts a arbitrary locale instance into one which is allowed to read and write data with.
      Parameters:
      external - the locale
      Throws:
      IllegalArgumentException - if no supported data locale could be found
    • isFallbackEnabled

      boolean isFallbackEnabled()
      Returns true if for the current session the Locale fallback is enabled.
      Returns:
      false otherwise.
    • getFallbacks

      List<Locale> getFallbacks(Locale requestedLocale)
      Returns a List with fallback Locales for the given Locale.
      Parameters:
      requestedLocale - the Locale for which all fallback Locales are requested.
      Returns:
      null if the locale fallback is not enabled (see isFallbackEnabled()).