Class Localization
java.lang.Object
de.hybris.platform.util.localization.Localization
Helper class for localization handling.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetLocalizedMap(String key) Returns a map which can be used as a parameter for setAllNames() of any localized item.static StringgetLocalizedString(String key) Return the localization of an given key and the current session language.static StringgetLocalizedString(String key, Object[] arguments) Return the localization of an given key and the current session language.
-
Constructor Details
-
Localization
public Localization()
-
-
Method Details
-
getLocalizedString
Return the localization of an given key and the current session language. The localized string will be processed byMessageFormatusing givenarguments.- Parameters:
key- the 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:
key- the key- Returns:
- the localized string
-
getLocalizedMap
Returns a map which can be used as a parameter for setAllNames() of any localized item.e.g. product.setAllNames( Localization.getLocalizedMap("myitemkey") );
or locItem.setLocalizedProperty( sess_ctx_with_language_null, key, Localization.getLocalizedMap("myitemkey") );- Parameters:
key- the which can be found in the localization files- Returns:
- the map
-