Starting with localisation

This commit is contained in:
Raphael Michel
2014-09-11 11:19:06 +02:00
parent 5243bba883
commit cc6d624f57
6 changed files with 115 additions and 3 deletions

View File

@@ -45,6 +45,7 @@ INSTALLED_APPS = (
MIDDLEWARE_CLASSES = (
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.locale.LocaleMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
@@ -82,6 +83,16 @@ USE_L10N = True
USE_TZ = True
LOCALE_PATHS = (
'locale',
)
from django.utils.translation import ugettext_lazy as _
LANGUAGES = (
('de', _('German')),
('en', _('English')),
)
# Authentication