translatable

open infix fun translatable(key: String): ComponentBuilder

Appends a translatable component with the specified translation key.

Return

this component builder for chaining

Parameters

key

the translation key


abstract fun translatable(key: String, vararg args: Component): ComponentBuilder

Appends a translatable component with component arguments. The arguments will be substituted into the translation pattern.

Return

this component builder for chaining

Parameters

key

the translation key

args

the component arguments for the translation


abstract fun translatable(key: String, args: List<Component>): ComponentBuilder

Appends a translatable component with the specified translation key and a list of component arguments.

Return

this component builder for chaining

Parameters

key

the translation key

args

the list of component arguments for the translation


abstract fun translatable(key: String, consumer: ComponentBuilder.() -> Unit): ComponentBuilder

Appends a translatable component with arguments built using a consumer lambda.

Return

this component builder for chaining

Parameters

key

the translation key

consumer

the consumer lambda that builds component arguments


abstract fun translatable(key: String, style: Style): ComponentBuilder

Appends a translatable component with the specified translation key and style.

Return

this component builder for chaining

Parameters

key

the translation key

style

the style to apply to the translatable component


abstract fun translatable(key: String, style: Style, vararg args: Component): ComponentBuilder

Appends a translatable component with the specified translation key, style, and component arguments.

Return

this component builder for chaining

Parameters

key

the translation key

style

the style to apply to the translatable component

args

the component arguments for the translation


abstract fun translatable(key: String, styler: Styler.() -> Unit, args: List<Component>): ComponentBuilder

Appends a translatable component with the specified translation key, style, and list of arguments.

Return

this component builder for chaining

Parameters

key

the translation key

styler

the style builder to apply to the translatable component

args

the list of component arguments for the translation


abstract fun translatable(key: String, styler: Styler.() -> Unit, consumer: ComponentBuilder.() -> Unit): ComponentBuilder

Appends a styled translatable component with arguments built using a nested component builder scope.

Return

this component builder for chaining

Parameters

key

the translation key

styler

the style builder to apply to the translatable component

consumer

the consumer lambda that builds component arguments


Extension property to append this string as a translatable component. Uses this string as the translation key for localized text.