Interface Translation
- All Known Subinterfaces:
MessageFormatTranslation,TextTranslation
public interface Translation
Represents a translation from a given translation system.
-
Method Summary
Modifier and TypeMethodDescriptionformat(TranslationArguments parameters) Formats the translation with the given parameters and return a string.default ComponentformatAsComponent(TranslationArguments parameters) Formats the translation with the given parameters and return a component.default voidformatTo(TranslationArguments parameters, ComponentStringBuilder builder) Deprecated, for removal: This API element is subject to removal in a future version.
-
Method Details
-
format
Formats the translation with the given parameters and return a string.- Parameters:
parameters- the translation parameters- Returns:
- the formatted translation as a string
-
formatAsComponent
Formats the translation with the given parameters and return a component.- Parameters:
parameters- the translation parameters- Returns:
- the formatted translation as a component
-
formatTo
@Deprecated(since="4.1", forRemoval=true) default void formatTo(TranslationArguments parameters, ComponentStringBuilder builder) Deprecated, for removal: This API element is subject to removal in a future version.This method has been replaced byformatAsComponent(TranslationArguments).Formats the translation to the givenComponentStringBuilder.- Parameters:
parameters- the translation parametersbuilder- the builder
-
formatAsComponent(TranslationArguments).