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