Hello site
[auf_framonde.git] / eggs / Django-1.4.5-py2.7.egg / django / conf / urls / i18n.py
CommitLineData
01b54c21
MN
1from django.conf import settings
2from django.conf.urls import patterns
3from django.core.urlresolvers import LocaleRegexURLResolver
4
5def i18n_patterns(prefix, *args):
6 """
7 Adds the language code prefix to every URL pattern within this
8 function. This may only be used in the root URLconf, not in an included
9 URLconf.
10
11 """
12 pattern_list = patterns(prefix, *args)
13 if not settings.USE_I18N:
14 return pattern_list
15 return [LocaleRegexURLResolver(pattern_list)]
16
17
18urlpatterns = patterns('',
19 (r'^setlang/$', 'django.views.i18n.set_language'),
20)