Browse Source

Enable i18n

pull/1/head
Hidden Z 14 years ago
parent
commit
918570cf9e
  1. 6
      pyi2phosts/settings.py
  2. 1
      pyi2phosts/urls.py

6
pyi2phosts/settings.py

@ -36,6 +36,11 @@ TIME_ZONE = 'America/Chicago'
# http://www.i18nguy.com/unicode/language-identifiers.html # http://www.i18nguy.com/unicode/language-identifiers.html
LANGUAGE_CODE = 'en-us' LANGUAGE_CODE = 'en-us'
LANGUAGES = (
('en', 'English'),
('ru', 'Russian'),
)
SITE_ID = 1 SITE_ID = 1
# If you set this to False, Django will make some optimizations so as not # If you set this to False, Django will make some optimizations so as not
@ -76,6 +81,7 @@ MIDDLEWARE_CLASSES = (
'django.middleware.csrf.CsrfViewMiddleware', 'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware', 'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.locale.LocaleMiddleware',
) )
ROOT_URLCONF = 'pyi2phosts.urls' ROOT_URLCONF = 'pyi2phosts.urls'

1
pyi2phosts/urls.py

@ -49,6 +49,7 @@ urlpatterns = patterns('',
(r'^search/$', include('pyi2phosts.search.urls')), (r'^search/$', include('pyi2phosts.search.urls')),
(r'^postkey/', include('pyi2phosts.postkey.urls')), (r'^postkey/', include('pyi2phosts.postkey.urls')),
(r'^jump/', include('pyi2phosts.jump.urls')), (r'^jump/', include('pyi2phosts.jump.urls')),
(r'^i18n/', include('django.conf.urls.i18n')),
# Example: # Example:
# (r'^pyi2phosts.', include('pyi2phosts.foo.urls')), # (r'^pyi2phosts.', include('pyi2phosts.foo.urls')),

Loading…
Cancel
Save