Help with Django localization--doesn't seem to be working. Nothing happens
Posted
by alex
on Stack Overflow
See other posts from Stack Overflow
or by alex
Published on 2010-05-21T01:00:02Z
Indexed on
2010/05/21
1:30 UTC
Read the original article
Hit count: 352
Can someone help me with Localization? I put {% trans "..." %} in my template, I filled in my django.po after running "makemessages".
#: templates/main_content.html:136
msgid "Go to page"
msgstr "¦~C~Z¦~C¦¦~B¦¦~L~G¦~Z"
#: templates/main_content.html:138
msgid "Page"
msgstr "¦~C~Z¦~C¦¦~B¦"
#: templates/main_content.html:154
msgid "Next"
msgstr "?"
Then, I set LANGUAGES={} in my settings.py along with "gettext lambda":
gettext = lambda s: s
LANGUAGES = (
('de', gettext('German')),
('en', gettext('English')),
('ja', gettext('Japanese')),
)
Of course, I installed the LocaleMiddleware.
I also set the request.session['django_language'] = "ja"
How do I test that this is working? How do I see japanese on my site!?
© Stack Overflow or respective owner