Interface LocaleProvider
- All Known Implementing Classes:
- DefaultLocaleProvider,- UserLocaleProvider
public interface LocaleProvider
Provides locale and timezone.
- Since:
- 5.6
- 
Method SummaryModifier and TypeMethodDescriptiongetLocale(CoreSession session) getLocale(DocumentModel userProfileDoc) Gets the locale stored in the given user profile.getLocaleWithDefault(String requestedLocale) Returns the default locale for given requested locale.getLocaleWithDefault(CoreSession session) getLocaleWithDefault(DocumentModel userProfileDoc) getTimeZone(CoreSession session) 
- 
Method Details- 
getLocale- Returns:
- the Locale to be used or null to let the caller decides.
 
- 
getLocaleGets the locale stored in the given user profile.- Returns:
- the Locale to be used or null to let the caller decide
 
- 
getLocaleWithDefault- Returns:
- the Locale to be used or a default Locale
- Since:
- 8.2
 
- 
getLocaleWithDefault- Returns:
- the Locale stored in userProfile or a default Locale
- Since:
- 8.2
 
- 
getTimeZone- Returns:
- the Timezone to be used or null to let the caller decides.
 
- 
getLocaleWithDefaultReturns 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
 
 
-