Interface L10NService
- All Known Implementing Classes:
DefaultL10NService,DefaultL10NServiceTest.MockDefaultL10NService
public interface L10NService
This service covers the most basic localization functionality like accessing the localized resource bundles and
supporting the hybris locale fallback mechanism. See DevNet page "Internationalization and Localization".
- Since:
- 4.3
- Spring Bean ID:
- l10nService
-
Method Summary
Modifier and TypeMethodDescriptiongetLocalizedString(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.
-
Method Details
-
getResourceBundle
ResourceBundle getResourceBundle()Returns aResourceBundlefor all type localizations which supports hybris specific fallback strategies.
The fallback bundles are fetched according to the current session Language.- Returns:
- the bundle
-
getResourceBundle
Returns aResourceBundlefor all type localizations. The resource bundle supports hybris specific fallback strategies.
Fallback bundles are fetched according to the passed locales.- Parameters:
locales- fallback locales (bundles)- Returns:
- the bundle
-
getResourceBundle
Returns aResourceBundlefor a given base name. The resource bundle supports hybris specific fallback strategies.
The fallback bundles are fetched according to the current session Language.- Parameters:
baseName- bundle name- Returns:
- the bundle
-
getResourceBundle
Returns aResourceBundlefor a given base name. The resource bundle supports hybris specific fallback strategies.
Fallback bundles are fetched according to the passed locales.- Parameters:
baseName- bundle namelocales- fallback locales (bundles)- Returns:
- the bundle
-
getLocalizedString
Return the localization of an given key and the current session language. The localized string will be processed byMessageFormatusing givenarguments.- Parameters:
resKey- the resource keyarguments- list of values for the text arguments (see MessageFormat.format(String, Object[]))- Returns:
- the localized string
-
getLocalizedString
Return the localization of an given key and the current session language.- Parameters:
resKey- the key- Returns:
- the localized string
-