Ask Your Question

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

asked 2011-12-19 12:26:51 -0600

quesada's avatar

updated 2011-12-19 12:38:02 -0600

Evgeny's avatar

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

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted

answered 2011-12-20 12:56:19 -0600

piskvorky's avatar

updated 2011-12-20 13:11:48 -0600

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/ 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 lives).

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

edit flag offensive delete link more


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's avatar Evgeny  ( 2011-12-20 13:02:27 -0600 )edit

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

piskvorky's avatar piskvorky  ( 2011-12-20 13:07:04 -0600 )edit

answered 2011-12-19 12:37:35 -0600

Evgeny's avatar

I had exactly the same question on StackOverflow a while ago, it might help you .

edit flag offensive delete link more

answered 2012-04-02 14:36:35 -0600

zaf's avatar

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?

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2011-12-19 12:26:51 -0600

Seen: 523 times

Last updated: Apr 02 '12