Class DefaultL10NService
java.lang.Object
de.hybris.platform.servicelayer.i18n.impl.DefaultL10NService
- All Implemented Interfaces:
L10NService
- Direct Known Subclasses:
DefaultL10NServiceTest.MockDefaultL10NService
Default implementation of the l10n service interface.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Map<Locale,Properties> getLocalizedString(String resKey) Return the localization of an given key and the current session language.getLocalizedString(String resKey, Object[] arguments) Return the localization of an given key and the current session language.Returns aResourceBundlefor all type localizations which supports hybris specific fallback strategies.
The fallback bundles are fetched according to the current session Language.getResourceBundle(String baseName) Returns aResourceBundlefor a given base name.getResourceBundle(String baseName, Locale[] locales) Returns aResourceBundlefor a given base name.getResourceBundle(Locale[] locales) Returns aResourceBundlefor all type localizations.voidsetCommonI18NService(CommonI18NService commonI18NService) voidsetI18nService(I18NService i18nService) voidsetModelService(ModelService modelService)
-
Constructor Details
-
DefaultL10NService
public DefaultL10NService()
-
-
Method Details
-
getResourceBundle
Description copied from interface:L10NServiceReturns aResourceBundlefor all type localizations which supports hybris specific fallback strategies.
The fallback bundles are fetched according to the current session Language.- Specified by:
getResourceBundlein interfaceL10NService- Returns:
- the bundle
-
getLocalizations
- Returns:
- localization map where key is a
Locale, and value is a instance ofProperties
-
getResourceBundle
Description copied from interface:L10NServiceReturns aResourceBundlefor all type localizations. The resource bundle supports hybris specific fallback strategies.
Fallback bundles are fetched according to the passed locales.- Specified by:
getResourceBundlein interfaceL10NService- Parameters:
locales- fallback locales (bundles)- Returns:
- the bundle
-
getLocalizedString
Description copied from interface:L10NServiceReturn the localization of an given key and the current session language. The localized string will be processed byMessageFormatusing givenarguments.- Specified by:
getLocalizedStringin interfaceL10NService- Parameters:
resKey- the resource keyarguments- list of values for the text arguments (see MessageFormat.format(String, Object[]))- Returns:
- the localized string
-
getLocalizedString
Description copied from interface:L10NServiceReturn the localization of an given key and the current session language.- Specified by:
getLocalizedStringin interfaceL10NService- Parameters:
resKey- the key- Returns:
- the localized string
-
getResourceBundle
Description copied from interface:L10NServiceReturns aResourceBundlefor a given base name. The resource bundle supports hybris specific fallback strategies.
The fallback bundles are fetched according to the current session Language.- Specified by:
getResourceBundlein interfaceL10NService- Parameters:
baseName- bundle name- Returns:
- the bundle
-
getResourceBundle
Description copied from interface:L10NServiceReturns aResourceBundlefor a given base name. The resource bundle supports hybris specific fallback strategies.
Fallback bundles are fetched according to the passed locales.- Specified by:
getResourceBundlein interfaceL10NService- Parameters:
baseName- bundle namelocales- fallback locales (bundles)- Returns:
- the bundle
-
setI18nService
-
setCommonI18NService
-
setModelService
-