Interface LocaleProvider
-
- All Known Implementing Classes:
DefaultLocaleProvider
,UserLocaleProvider
public interface LocaleProvider
Provides locale and timezone.- Since:
- 5.6
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Locale
getLocale(CoreSession session)
Locale
getLocale(DocumentModel userProfileDoc)
Gets the locale stored in the given user profile.Locale
getLocaleWithDefault(String requestedLocale)
Returns the default locale for given requested locale.Locale
getLocaleWithDefault(CoreSession session)
Locale
getLocaleWithDefault(DocumentModel userProfileDoc)
TimeZone
getTimeZone(CoreSession session)
-
-
-
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.
-
-