i18n_patterns
Add the language code prefix to every URL pattern within this function. This may only be used in the root URLconf, not in an included URLconf.
def i18n_patterns(
*urls: tuple,
prefix_default_language: boolean = True
) - > list
Add the language code prefix to every URL pattern within this function. This may only be used in the root URLconf, not in an included URLconf.
Parameters
| Name | Type | Description |
|---|---|---|
| *urls | tuple | A sequence of URL patterns or included URLconfs to be prefixed with language codes. |
| prefix_default_language | boolean = True | Determines whether the language prefix should be prepended to the default language's URLs. |
Returns
| Type | Description |
|---|---|
list | A list of URL resolvers wrapped with a locale prefix pattern if internationalization is enabled, otherwise the original URL list. |