Ask Your Question

LANGUAGE_CODE not applied to commands

asked 2012-02-14 14:33:28 -0500

Benoit's avatar

I have a translated site where the URL for questions is translated. When I use question.get_absolute_url() within the askbot application, everything works well.

However, if I use it within a command invoked with, the URL returned is the one for english.

Using the translation.get_language() call, the language is set to 'en-us', even though my is different. The django settings.LANGUAGE_CODE is correct.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2012-02-14 14:40:00 -0500

Benoit's avatar

updated 2012-02-14 14:41:33 -0500

A quick workaround is place this at the beginning of the command:


Or, maybe put it in so it takes effect for all commands.

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: 2012-02-14 14:33:28 -0500

Seen: 267 times

Last updated: Feb 14 '12