views:

52

answers:

2

How to turn it on?

According to this http://docs.djangoproject.com/en/1.2/topics/i18n/internationalization/

I put into my template /var/www/project/template/index.html

{% load i18n %}
{% get_current_language as LANGUAGE_CODE %}
{% get_available_languages as LANGUAGES %}
<html><body><h1>{% trans "It works!" $}</h1>
get_current_language = {{ LANGUAGE_CODE }}<br>
get_available_languages = {{ LANGUAGES}}<br></body></html>

and in folder /var/www/project/template/ I create locale subfolder than I run

django-admin makemessages -l pl_pl

processing language pl_pl

and there's no files in locale/pl_pl/LC_MESSAGES/ (which are automagicaly created)

What should I do more?

A: 

Shouldn't your index file be in project/templates/ (with an s) ? Otherwise, have you declared 'project' in your INSTALLED_APPS ?

Guillaume Esquevin
typo. There is templates not template. Yes, it's also declared in settings.py
SledgehammerPL
A: 
SledgehammerPL
If you put the locale folder in the same directory as settings.py, you don't need to specify the location.
Chris Lawlor
but django-admin makemessages -l pl_pl wouldn't look into /var/www/project/templates, would it?
SledgehammerPL