Ask Your Question
2

What are the steps to switch to a language other than 'en'?

asked Dec 19 '11

quesada gravatar image quesada
55 2 7

updated Dec 19 '11

Evgeny gravatar image Evgeny flag of Chile
6715 31 49 96
http://askbot.org/

I've tried setting LANGUAGE_CODE = "es" or to anything other than "en" and it didn't work.

3 Answers

Sort by ยป oldest newest most voted
2
quesada has selected this answer as correct

answered Dec 20 '11

piskvorky gravatar image piskvorky
330 2 16

updated Dec 20 '11

Actually, most of the spanish translation strings are simply commented out in the spanish .po catalogue. One example is the string "badges", visible in the top navigation menu:

#~ msgid "badges"
#~ msgstr "medallas"

The comment format is #~, which means the strings are ignored because they are obsolete. Why they are obsolete I don't know, but a simple fix is to run

[PROJECT_ROOT/apps/askbot/] PROJECT_ROOT/manage.py jinja2_makemessages --no-wrap -l es -e html,py,txt

That is, run that command from the askbot app subdirectory (not from PROJECT_ROOT where manage.py lives).

That will un-obsolete the es askbot strings and make them visible/translatable from rosetta.

link

Comments

which version of django are you using? The strings might have become obsoleted when someone used development django trunk to rebuild strings. Apparently only the new version can extract strings from js correctly, but they might have broken the python/html extractor.

Evgeny (Dec 20 '11)

@Evgeny: our django.VERSION is (1, 3, 1, 'final', 0)

piskvorky (Dec 20 '11)
2
quesada has selected this answer as correct

answered Dec 19 '11

Evgeny gravatar image Evgeny flag of Chile
6715 31 49 96
http://askbot.org/

I had exactly the same question on StackOverflow a while ago, it might help you http://stackoverflow.com/questions/1230315/cant-switch-language-environment-in-django .

link
0
quesada has selected this answer as correct

answered Apr 02

zaf gravatar image zaf
419 6 20

Hello all,

I have the same problem, many of the translation pairs have become obsolete (with #~ in front) and even when I followed what @piskvorky suggested, they keep being obsolete.

Any suggestions?

link

Your answer

Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!
[hide preview]

Question tools

Follow
1 follower

subscribe to rss feed

Stats

Asked: Dec 19 '11

Seen: 106 times

Last updated: Apr 02