@Role public interface TranslationBundle extends Comparable<TranslationBundle>
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULTPRIORITY
The default priority of a Bundle.
|
Modifier and Type | Method and Description |
---|---|
String |
getId() |
int |
getPriority()
When searching for a translation, the bundles are searched in order until one of these bundles contains a value
for the searched key.
|
Translation |
getTranslation(String key,
Locale locale)
Return the translation for the given key, in the specified
Locale . |
compareTo
static final int DEFAULTPRIORITY
String getId()
int getPriority()
Comparable.compareTo(Object)
Translation getTranslation(String key, Locale locale)
Locale
. If not translation for the exact
Locale can be found it fallback on the language and then on the default translation if any.key
- the key to translate.locale
- the locale to translate into.Translation
or null if none can be found.Copyright © 2004–2022 XWiki. All rights reserved.