public class I18nHelperImpl extends Object implements I18nHelper
Constructor and Description |
---|
I18nHelperImpl(List<ResourceBundleProvider> providers) |
Modifier and Type | Method and Description |
---|---|
Map<String,String> |
getAllTranslationsForPrefix(String prefix)
Return a map of all the translated keys whose keys start with the given prefix, indexed by their key.
|
String |
getText(Locale locale,
String key,
Serializable... arguments) |
String |
getText(String key) |
String |
getText(String key,
Object parameters) |
String |
getText(String key,
String value1) |
String |
getText(String key,
String value1,
String value2) |
String |
getUnescapedText(Locale locale,
String key) |
String |
getUnescapedText(String key)
Get the raw property value, complete with {0}'s.
|
public I18nHelperImpl(List<ResourceBundleProvider> providers)
public String getText(String key)
getText
in interface I18nHelper
key
- i18n key.public String getText(String key, String value1)
getText
in interface I18nHelper
key
- i18n key.value1
- first value to interpolate.public String getText(String key, String value1, String value2)
getText
in interface I18nHelper
key
- i18n key.value1
- first value to interpolate.value2
- second value to interpolate.public String getText(String key, Object parameters)
getText
in interface I18nHelper
key
- i18n key.parameters
- list, object array or value of parameter(s) to interpolate.public String getText(Locale locale, String key, Serializable... arguments)
getText
in interface I18nHelper
locale
- the locale to translate into.key
- the key to translate.arguments
- the arguments to be inserted into the translated string.public String getUnescapedText(String key)
getUnescapedText
in interface I18nHelper
key
- Non-null key to look uppublic String getUnescapedText(Locale locale, String key)
getUnescapedText
in interface I18nHelper
locale
- the locale to translate into.key
- i18n key.public Map<String,String> getAllTranslationsForPrefix(String prefix)
I18nHelper
getAllTranslationsForPrefix
in interface I18nHelper
prefix
- the prefixCopyright © 2016 Atlassian. All rights reserved.