First time here? Check out the FAQ!
0

How do I change language to modified chinese

hi, I have modified my django.po file to suit my needs.

the file I changed is site-packages/askbot/locale/zh_CN/LC_MESSAGES/django.po

but I did not see any change after I restarted the server.

jerry_gzy's avatar
53
jerry_gzy
asked 2012-01-13 18:38:58 -0600
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

0

In your settings.py you should have:

USE_I18N = True
LANGUAGE_CODE = 'zh_CN'

LocaleMiddleware should not be used.

Also django.po file needs to be compiled - cd askbot; python ../manage.py compilemessages

Your system must have package called gettext - it might be absent in some systems.

Does this help you?

Evgeny's avatar
13.2k
Evgeny
answered 2012-01-13 18:43:04 -0600, updated 2012-01-13 18:43:24 -0600
edit flag offensive 0 remove flag delete link

Comments

hi, I have tried to run python ../manage.py compilemessages , but I got Error: This script should be run from the Django SVN tree or your project or app tree, or with the settings module specified.

jerry_gzy's avatar jerry_gzy (2012-01-14 12:41:25 -0600) edit

This needs to be done fro askbot app directory not from the project root. From where did you download askbot?

Evgeny's avatar Evgeny (2012-01-14 12:43:09 -0600) edit

I used virtualenv and askbot-setup under /home/jerry/WebApp/ and used . for where the Askbot project resides. do I need to install it under the Vitualenv dir ?( for my case, /home/jerry/VE)

jerry_gzy's avatar jerry_gzy (2012-01-14 12:55:19 -0600) edit

you need to activate your virtual environment, then cd askbot, then run python ../manage.py compilemessages. That is assuming that you've installed askbot in development mode - using python setup.py develop in the first place, otherwise the command needs to be run from the askbot app directory - possibly inside your virtual environment.

Evgeny's avatar Evgeny (2012-01-14 13:00:12 -0600) edit

I think i did not have the develop mode installed, so How do I do it? I only know the askbot-setup command for installing the project. where can I find the setup.py?

jerry_gzy's avatar jerry_gzy (2012-01-14 13:15:55 -0600) edit
add a comment see more comments