Skip to content

Language

endstone.lang

Classes:

Name Description
Language

Represents the interface for translating text into different languages.

Translatable

Represents an object with a text representation that can be translated by the Minecraft client.

Language

Represents the interface for translating text into different languages.

Methods:

Name Description
translate

Attributes:

Name Type Description
locale str

Gets the current locale.

locale property

locale: str

Gets the current locale.

translate

translate(
    text: str,
    params: list[str] | None = None,
    locale: str | None = None,
) -> str

Translates a given text using a set of parameters for a specific locale.

translate(
    translatable: Translatable, locale: str | None = None
) -> str

Translates a Translatable object into a specific locale.

Translatable

Translatable(text: str, params: list[str] | None = None)

Represents an object with a text representation that can be translated by the Minecraft client.

Attributes:

Name Type Description
params list[str]

Get the translation parameters.

text str

Get the text to be translated.

params property

params: list[str]

Get the translation parameters.

text property

text: str

Get the text to be translated.