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:
- Download and unzip gettext into some directory.
- Add the /bin subdirectory of that directory to your path.
- Download iconv.dll and slap it into the bin dir.
- 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:
Skicka en kommentar