Interface LocaleResolver

    • Method Detail

      • resolveLocale

        java.util.Locale resolveLocale​(Translet translet)
        Resolve the current locale via the given translet. Can return a default locale as fallback in any case.
        Parameters:
        translet - the translet to resolve the locale for
        Returns:
        the current locale (never null)
      • resolveTimeZone

        java.util.TimeZone resolveTimeZone​(Translet translet)
        Resolve the current timezone via the given translet. Can return a default timezone as fallback in any case.
        Parameters:
        translet - the translet to resolve the timezone for
        Returns:
        the current timezone (never null)
      • setLocale

        void setLocale​(Translet translet,
                       java.util.Locale locale)
        Set the current locale to the given one.
        Parameters:
        translet - the translet to resolve the locale for
        locale - the new locale, or null to clear the locale
        Throws:
        java.lang.UnsupportedOperationException - if the LocaleResolver implementation does not support dynamic changing of the locale
      • setTimeZone

        void setTimeZone​(Translet translet,
                         java.util.TimeZone timeZone)
        Set the current timezone to the given one.
        Parameters:
        translet - the translet to resolve the locale for
        timeZone - the new timezone, or null to clear the timezone
        Throws:
        java.lang.UnsupportedOperationException - if the LocaleResolver implementation does not support dynamic changing of the timezone