I can not understand how to create .po and .mo files to use translation in my GAE project. I found django-admin.py at /Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/lib/django-1.5/django/bin/django-admin.py
, but if I run it as python django-admin.py
, then I get
Traceback (most recent call last):
File "django-admin.py", line 2, in <module>
from django.core import management
ImportError: No module named django.core
Ok, the following helped to start working with localization -
export PYTHONPATH="$PYTHONPATH:/usr/local/google_appengine/lib/django-1.5"
brew install gettext
brew link gettext --force
mkdir conf
mkdir conf/locale
python /usr/local/google_appengine/lib/django-1.5/django/bin/django-admin.py makemessages -l ru
(btw, here is good, but old article about django translation usage with GAE; see also this article )
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.