A blog about one guys quest to learn Python, Django and Google App Engine.
Feed: http://appengineguy.com/atom.xml

tisdag 29 juli 2008

Internationalization problems

Just ran into a few issues when trying to get internationalization working - these are tips I really could have used.

First, you need to create a directory called locale in your django application dir (i.e. the directory where you keep the views.py file).

To create the language files, you need to run django-admin.py makemessages from your django app dir. When I ran this, I got this:

Error message: makemessages is an unknown command on django-admin.py
Took me a while to figure this one out - this can occur if django is not installed - i.e if you just have it in your app engine dir, it won't cut it. You need to run setup.py install to sort it out. Bastard.

You need to have gettext on your system for the localization to work. Unix systems have this per default, but Windows does not, and getting it to work involves a frickin' moon process. This is what you need to do:



  1. Download and unzip gettext into some directory.
  2. Add the /bin subdirectory of that directory to your path.
  3. Download iconv.dll and slap it into the bin dir.
  4. Download intl.dll (I have no idea what this is) and slap it into the bin dir.

Sorry for this jumbled up post - it's written at 2AM after fighting with this for way too long.

Inga kommentarer: