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.

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)
jerry_gzy's avatar
53
jerry_gzy
asked 13 years ago

Comments

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?

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, updated 13 years ago
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 (13 years ago)

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

Evgeny's avatar Evgeny (13 years ago)

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 (13 years ago)

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 (13 years ago)

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 (13 years ago)
see more comments