com.atlassian.crowd.util
Class I18nHelperImpl
java.lang.Object
com.atlassian.crowd.util.I18nHelperImpl
- All Implemented Interfaces:
- I18nHelper
public class I18nHelperImpl
- extends Object
- implements I18nHelper
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
I18nHelperImpl
public I18nHelperImpl(List<ResourceBundleProvider> providers)
getText
public String getText(String key)
- Specified by:
getText
in interface I18nHelper
- Parameters:
key
- i18n key.
- Returns:
- internationalised text.
getText
public String getText(String key,
String value1)
- Specified by:
getText
in interface I18nHelper
- Parameters:
key
- i18n key.value1
- first value to interpolate.
- Returns:
- internationalised text.
getText
public String getText(String key,
String value1,
String value2)
- Specified by:
getText
in interface I18nHelper
- Parameters:
key
- i18n key.value1
- first value to interpolate.value2
- second value to interpolate.
- Returns:
- internationalised text.
getText
public String getText(String key,
Object parameters)
- Specified by:
getText
in interface I18nHelper
- Parameters:
key
- i18n key.parameters
- list, object array or value of parameter(s) to interpolate.
- Returns:
- internationalised text.
getText
public String getText(Locale locale,
String key,
Serializable... arguments)
- Specified by:
getText
in interface I18nHelper
- Parameters:
locale
- the locale to translate into.key
- the key to translate.arguments
- the arguments to be inserted into the translated string.
- Returns:
- the translated string.
getUnescapedText
public String getUnescapedText(String key)
- Get the raw property value, complete with {0}'s.
- Specified by:
getUnescapedText
in interface I18nHelper
- Parameters:
key
- Non-null key to look up
- Returns:
- Unescaped property value for the key, or the key itself if no property with the specified key is found
getAllTranslationsForPrefix
public Map<String,String> getAllTranslationsForPrefix(String prefix)
- Description copied from interface:
I18nHelper
- Return a map of all the translated keys whose keys start with the given prefix, indexed by their key.
- Specified by:
getAllTranslationsForPrefix
in interface I18nHelper
- Parameters:
prefix
- the prefix
- Returns:
- a Map of keys to translated keys
Copyright © 2013 Atlassian. All Rights Reserved.