Interface TranslationsResource

  • public interface TranslationsResource
    Exposes the wiki translations through REST.
    $Id: 967a8e6713c64c7a7382bb14983d38f784f798b4 $
    • 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 of Translation. 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 is null.

        wikiName - the name of the wiki holding the translation keys
        locale - the locale of the translations, when null the current locale of the user is used
        prefix - a common prefix, concatenated to each translation key before resolving their sources (can be null in which case nothing is concatenated)
        keys - the translation keys to resolve. If no key is passed, and empty object is returned
        the list of resolved translations