pylons, internationalization
-
create a i18n-directory into your pylons-project directory on the same level like the config- and the controller-module
-
install babel
easy_install babel
-
scan your app for placeholders with babel
python setup.py extract_messages
-
create a new language catalog for the language of your choice with babel
python setup.py init_catalog -l de
-
compile after every change the language file with babel
python setup.py compile_catalog
after that, you need to import some methods from the pylons.i18n module:
from pylons.i18n import get\_lang, set\_lang
from pylons.i18n.translation import \_
most of this infos can be found in the official pylon documentation. but some, like the import of _ or the the place of the i18n-directory not.
more:
http://pylonsbook.com/en/1.1/internationalization-and-localization.html
http://wiki.pylonshq.com/display/pylonsdocs/Internationalization+and+Localization