get Message
Retrieves a formatted localized message based on the provided key and optional arguments.
The formatting follows a sequential argument replacement mechanism (e.g., %s, %s
).
Return
The formatted localized message content.
Parameters
The message key.
Optional arguments used to format the message.
Retrieves a formatted localized message using a map of named arguments.
This method allows for explicit placeholder replacement (e.g., %player%
, %id%
).
Return
The formatted localized message content.
Parameters
The message key.
A map of placeholders and their corresponding values.
Retrieves a formatted localized message using an intermediate data type.
The given intermediate object is transformed into a placeholder map, which is then used for message formatting.
Return
The formatted localized message content.
Parameters
The message key.
An object containing data relevant to the message.
A function to convert the intermediate object into a map of placeholders.