get_language_from_request
Returns the default language code from the application settings, regardless of the provided request or path check parameters.
def get_language_from_request(
request: HttpRequest,
check_path: boolean = False
) - > string
Retrieves the default language code from the application settings for the given request.
Parameters
| Name | Type | Description |
|---|---|---|
| request | HttpRequest | The incoming HTTP request object used to determine the context for language resolution. |
| check_path | boolean = False | Whether to inspect the URL path for language prefixes during the resolution process. |
Returns
| Type | Description |
|---|---|
string | The ISO 639-1 language code defined in the project settings, such as "en-us". |