December 2016
Beginner to intermediate
694 pages
14h 2m
English
Django provides two mechanisms to internationalize URL patterns:
LocaleMiddleware to detect the language to activate from the requested URL.django.utils.translation.ugettext_lazy() function.Using either one of these features requires that an active language be set for each request; in other words, you need to have django.middleware.locale.LocaleMiddleware in your MIDDLEWARE_CLASSES setting.
This function can be used in your root URLconf and Django will automatically prepend the current active language code to all URL patterns defined within i18n_patterns() ...
Read now
Unlock full access