I created a Django site with localization built in, using python manage.py runserver
to test it. But after setting it live with Apache/WSGI, the localization doesn't work correctly.
I can see dates being translated (so somehow it knows the current language), but all my site-specific strings are untranslated.
I have no idea where to look though on where to fix this.
When running on the Django console, it works fine:
>>> import django.utils.translation
>>> django.utils.translation.activate('nl')
>>> django.utils.translation.ugettext('Articles')
u'Artikelen'
But when using the same code in a view:
from django.utils import translation
def page_test(request):
translation.activate('nl')
return HttpResponse(translation.ugettext("Articles"))
this returns Articles
.