--- a/src/p4l/settings.py Thu Sep 05 13:09:57 2013 +0200
+++ b/src/p4l/settings.py Thu Sep 05 13:25:32 2013 +0200
@@ -1,4 +1,5 @@
# Django settings for p4l project.
+from django.conf import global_settings
DEBUG = True
TEMPLATE_DEBUG = DEBUG
@@ -40,6 +41,7 @@
LANGUAGES = (
('fr', ugettext('French')),
('en', ugettext('English')),
+ ('es', ugettext('Spanish')),
)
@@ -100,10 +102,10 @@
MIDDLEWARE_CLASSES = (
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
+ 'django.middleware.locale.LocaleMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
- 'django.middleware.locale.LocaleMiddleware',
# Uncomment the next line for simple clickjacking protection:
# 'django.middleware.clickjacking.XFrameOptionsMiddleware',
)
@@ -136,6 +138,10 @@
'p4l'
)
+TEMPLATE_CONTEXT_PROCESSORS = global_settings.TEMPLATE_CONTEXT_PROCESSORS + (
+ 'django.core.context_processors.i18n',
+)
+
# A sample logging configuration. The only tangible logging
# performed by this configuration is to send an email to
# the site admins on every HTTP 500 error when DEBUG=False.