Interface LocaleProvider

    • Method Detail

      • getLocale

        Locale getLocale​(CoreSession session)
        Returns:
        the Locale to be used or null to let the caller decides.
      • getLocale

        Locale getLocale​(DocumentModel userProfileDoc)
        Gets the locale stored in the given user profile.
        Returns:
        the Locale to be used or null to let the caller decide
      • getLocaleWithDefault

        Locale getLocaleWithDefault​(CoreSession session)
        Returns:
        the Locale to be used or a default Locale
        Since:
        8.2
      • getLocaleWithDefault

        Locale getLocaleWithDefault​(DocumentModel userProfileDoc)
        Returns:
        the Locale stored in userProfile or a default Locale
        Since:
        8.2
      • getTimeZone

        TimeZone getTimeZone​(CoreSession session)
        Returns:
        the Timezone to be used or null to let the caller decides.
      • getLocaleWithDefault

        Locale getLocaleWithDefault​(String requestedLocale)
        Returns the default locale for given requested locale.

        Checks if requested locale is part of supported locales, and fall-backs on a default locale if not (or if requested locale is empty).

        Since:
        8.4