org.xwiki.localization.internal
Class DefaultLocalizedTranslationBundle
java.lang.Object
org.xwiki.localization.internal.DefaultLocalizedTranslationBundle
- All Implemented Interfaces:
- LocalizedTranslationBundle
public class DefaultLocalizedTranslationBundle
- extends Object
- implements LocalizedTranslationBundle
Default implementation of LocalizedTranslationBundle
.
- Since:
- 4.3M2
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultLocalizedTranslationBundle
public DefaultLocalizedTranslationBundle(TranslationBundle bundle,
Locale locale)
- Parameters:
bundle
- the TranslationBundle
containing this LocalizedTranslationBundle
locale
- the Locale
associated to this bundle.
getBundle
public TranslationBundle getBundle()
- Specified by:
getBundle
in interface LocalizedTranslationBundle
- Returns:
- the
TranslationBundle
containing this LocalizedTranslationBundle
getLocale
public Locale getLocale()
- Specified by:
getLocale
in interface LocalizedTranslationBundle
- Returns:
- the
Locale
associated to this bundle
getTranslation
public Translation getTranslation(String key)
- Description copied from interface:
LocalizedTranslationBundle
- Get the translation associated to the passed key.
- Specified by:
getTranslation
in interface LocalizedTranslationBundle
- Parameters:
key
- the translation key
- Returns:
- the translation
addTranslation
public void addTranslation(Translation translation)
- Parameters:
translation
- the translation to add to the bundle