Package org.xwiki.localization.rest
Interface TranslationsResource
-
public interface TranslationsResource
Exposes the wiki translations through REST.- Since:
- 13.3RC1
- Version:
- $Id: 967a8e6713c64c7a7382bb14983d38f784f798b4 $
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Translations
getTranslations(String wikiName, String locale, String prefix, List<String> keys)
Returns the raw source of the requested translation keys.
-
-
-
Method Detail
-
getTranslations
Translations getTranslations(String wikiName, String locale, String prefix, List<String> keys)
Returns the raw source of the requested translation keys. In other words, the translation values without the parameters resolved.The payload of a successful response is a
Translations
object containing a collection ofTranslation
. Each translation is composed of a translation key (with the prefix concatenated), and the resolved translation source for the requested locale. If the translation key is not found, the raw source isnull
.- Parameters:
wikiName
- the name of the wiki holding the translation keyslocale
- the locale of the translations, whennull
the current locale of the user is usedprefix
- a common prefix, concatenated to each translation key before resolving their sources (can benull
in which case nothing is concatenated)keys
- the translation keys to resolve. If no key is passed, and empty object is returned- Returns:
- the list of resolved translations
-
-