Class DefaultLocaleProvider
java.lang.Object
de.hybris.platform.servicelayer.internal.converter.impl.DefaultLocaleProvider
- All Implemented Interfaces:
LocaleProvider,Serializable
Default locale provider to be used in
AbstractItemModel. It wraps the I18NService.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns current (session) data locale to be used to read or store localized attribute data.getFallbacks(Locale requested) booleanReturnstrueif for the current session theLocalefallback is enabled.protected I18NServiceservice()toDataLocale(Locale external) Converts a arbitrary locale instance into one which is allowed to read and write data with.
-
Constructor Details
-
DefaultLocaleProvider
-
-
Method Details
-
service
-
getCurrentDataLocale
Description copied from interface:LocaleProviderReturns current (session) data locale to be used to read or store localized attribute data. May be other thanI18NService.getCurrentLocale()!- Specified by:
getCurrentDataLocalein interfaceLocaleProvider
-
toDataLocale
Description copied from interface:LocaleProviderConverts a arbitrary locale instance into one which is allowed to read and write data with.- Specified by:
toDataLocalein interfaceLocaleProvider- Parameters:
external- the locale
-
getFallbacks
Description copied from interface:LocaleProvider- Specified by:
getFallbacksin interfaceLocaleProvider- Parameters:
requested- the Locale for which all fallback Locales are requested.- Returns:
nullif the locale fallback is not enabled (seeLocaleProvider.isFallbackEnabled()).
-
isFallbackEnabled
public boolean isFallbackEnabled()Description copied from interface:LocaleProviderReturnstrueif for the current session theLocalefallback is enabled.- Specified by:
isFallbackEnabledin interfaceLocaleProvider- Returns:
falseotherwise.
-