Skip to main content

i18n

Returns a dictionary containing language-related settings and the current translation state, including available languages, the active language code, and its text direction.

def i18n(
request: HttpRequest
) - > dict

Provides internationalization context variables for templates, including available languages and current locale settings.

Parameters

NameTypeDescription
requestHttpRequestThe current Django HTTP request object used to determine the active translation context.

Returns

TypeDescription
dictA dictionary containing the list of supported languages, the current active language code, and a boolean indicating if the current language is right-to-left.