First, you'll have to provide django's locale tree along with your
application files and add an entry in settings.LOCALE_PATHS for it. In
your settings.py:
import os
appdir = os.path.abspath(os.path.dirname(__file__))
LOCALE_PATHS = (
os.path.join(appdir, 'i18n', 'locale'),
)
The above assumes an i18n directory at the same level as your
settings.py file, containing a locale directory with django's
internationalization files.
Next, if you also want support for
django.middleware.locale.LocaleMiddleware, you need to execute the
following lines in your main.py file, just after calling
InstallAppengineHelperForDjango():
from django.conf import settings
sys.modules[settings.__module__].__file__ = os.path.join(
os.path.dirname(settings.LOCALE_PATHS[0]), '__init__.py'
)
I added this just before calling main()