Interface L10NService
-
- All Known Implementing Classes:
DefaultL10NService,SAPMockL10NService
public interface L10NServiceThis 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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.StringgetLocalizedString(java.lang.String resKey)Return the localization of an given key and the current session language.java.lang.StringgetLocalizedString(java.lang.String resKey, java.lang.Object[] arguments)Return the localization of an given key and the current session language.java.util.ResourceBundlegetResourceBundle()Returns aResourceBundlefor all type localizations which supports hybris specific fallback strategies.
The fallback bundles are fetched according to the current session Language.java.util.ResourceBundlegetResourceBundle(java.lang.String baseName)Returns aResourceBundlefor a given base name.java.util.ResourceBundlegetResourceBundle(java.lang.String baseName, java.util.Locale[] locales)Returns aResourceBundlefor a given base name.java.util.ResourceBundlegetResourceBundle(java.util.Locale[] locales)Returns aResourceBundlefor all type localizations.
-
-
-
Method Detail
-
getResourceBundle
java.util.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
java.util.ResourceBundle getResourceBundle(java.util.Locale[] locales)
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
java.util.ResourceBundle getResourceBundle(java.lang.String baseName)
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
java.util.ResourceBundle getResourceBundle(java.lang.String baseName, java.util.Locale[] locales)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
java.lang.String getLocalizedString(java.lang.String resKey, java.lang.Object[] arguments)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
java.lang.String getLocalizedString(java.lang.String resKey)
Return the localization of an given key and the current session language.- Parameters:
resKey- the key- Returns:
- the localized string
-
-