public class Localization extends Object
| Constructor and Description |
|---|
Localization() |
| Modifier and Type | Method and Description |
|---|---|
static Map<Language,String> |
getLocalizedMap(String key)
Returns a map which can be used as a parameter for setAllNames() of any localized item.
|
static String |
getLocalizedString(String key)
Return the localization of an given key and the current session language.
|
static String |
getLocalizedString(String key,
Object[] arguments)
Return the localization of an given key and the current session language.
|
public static String getLocalizedString(String key, Object[] arguments)
MessageFormat using given arguments.key - the keyarguments - list of values for the text arguments (see MessageFormat.format(String, Object[]))public static String getLocalizedString(String key)
key - the keypublic static Map<Language,String> getLocalizedMap(String key)
e.g. product.setAllNames( Localization.getLocalizedMap("myitemkey") );
or locItem.setLocalizedProperty( sess_ctx_with_language_null, key, Localization.getLocalizedMap("myitemkey") );
key - the which can be found in the localization filesCopyright © 2017 SAP SE. All Rights Reserved.