Skip to main content

get_language_from_path

No overview available.

def get_language_from_path(
request: HttpRequest
) - > string

Extracts the language code from the URL path of the incoming request.

Parameters

NameTypeDescription
requestHttpRequestThe incoming HTTP request object containing the path to be parsed.

Returns

TypeDescription
stringThe identified language code or None if no language can be determined from the path.