First time here? Check out the FAQ!
2

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

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

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
quesada's avatar
65
quesada
asked 13 years ago
Evgeny's avatar
13.2k
Evgeny
updated 13 years ago

Comments

see more comments

3 Answers

2

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 .

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
Evgeny's avatar
13.2k
Evgeny
answered 13 years ago
link

Comments

see more comments
2

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.

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
piskvorky's avatar
350
piskvorky
answered 13 years ago, updated 13 years ago
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's avatar Evgeny (13 years ago)

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

piskvorky's avatar piskvorky (13 years ago)
see more comments
0

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?

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
zaf's avatar
512
zaf
answered 13 years ago
link

Comments

see more comments