Interface ContextualLocalizationManager

    • Method Detail

      • getTranslationPlain

        String getTranslationPlain​(String key,
                                   Object... parameters)
        Find a translation in the current language.
        Parameters:
        key - the key identifying the message to look for
        parameters - the parameters
        Returns:
        the translation in the current language rendered as plain text, null if no translation could be found
        See Also:
        getTranslation(String)
      • getTranslation

        @Unstable
        default String getTranslation​(String key,
                                      org.xwiki.rendering.syntax.Syntax targetSyntax,
                                      Object... parameters)
                               throws LocalizationException
        Find a translation in the current language.
        Parameters:
        key - the key identifying the message to look for
        targetSyntax - the syntax in which to render the translation
        parameters - the parameters
        Returns:
        the translation in the current language, rendered in the target syntax, null if no translation could be found or it couldn't be rendered
        Throws:
        LocalizationException - if there's an error while getting the Renderer for the passed syntax
        Since:
        15.5RC1, 14.10.12
        See Also:
        getTranslation(String)