i18n_patterns(*urls, prefix_default_language=True) [source]
This function can be used in a root URLconf and Django will automatically prepend the current active language code to all URL patterns defined within i18n_patterns().
Setting prefix_default_language to False removes the prefix from the default language (LANGUAGE_CODE). This can be useful when adding translations to existing site so that the current URLs won’t change.
Example URL patterns:
from django.conf.urls import include, url
fr