Skip to main content

gettext

Translate the 'message' string. It uses the current thread to find the translation object to use. If no current translation is activated, the message will be run through the default translation object.

def gettext(
message: string
) - > string

Translate the 'message' string. It uses the current thread to find the translation object to use. If no current translation is activated, the message will be run through the default translation object.

Parameters

NameTypeDescription
messagestringThe text string to be translated, which will have line endings normalized before lookup.

Returns

TypeDescription
stringThe translated version of the input message, preserving its safe-string status if applicable.