Package org.xwiki.localization.rest
Interface TranslationsResource
-
@Unstable public interface TranslationsResourceExposes the wiki translations through REST.- Since:
- 13.3RC1
- Version:
- $Id: 9bd49809dd9e66f77d9149e80fa2cccb81d88ce9 $
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description TranslationsgetTranslations(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
Translationsobject 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, whennullthe current locale of the user is usedprefix- a common prefix, concatenated to each translation key before resolving their sources (can benullin 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
-
-