Interface LocaleProvider

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.util.Locale getCurrentDataLocale()
      Returns current (session) data locale to be used to read or store localized attribute data.
      java.util.List<java.util.Locale> getFallbacks​(java.util.Locale requestedLocale)
      Returns a List with fallback Locales for the given Locale.
      boolean isFallbackEnabled()
      Returns true if for the current session the Locale fallback is enabled.
      java.util.Locale toDataLocale​(java.util.Locale external)
      Converts a arbitrary locale instance into one which is allowed to read and write data with.
    • Method Detail

      • getCurrentDataLocale

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

        java.util.Locale toDataLocale​(java.util.Locale external)
        Converts a arbitrary locale instance into one which is allowed to read and write data with.
        Parameters:
        external - the locale
        Throws:
        java.lang.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

        java.util.List<java.util.Locale> getFallbacks​(java.util.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()).