Soluling home   Document home

Python Localization and Internationalization

Python Localization and Internationalization

Python (Wikipedia) is a very popular programming language to build web pages and applications. Soluling localization tool and service support Python.

Localization process

This is the most common way to localize Python applications is to use gettext. When using gettext you identify all those strings that need to be translated and then you replace the strings with calls to gettext functions. On runtime gettext function returns the right string matching the language that is currently selected. gettext is by default included to Python platforms.

There are several web frameworks that work on top of Python. It may be that the markup that the framework uses is not compatible to the standard markup. However if you use gettext in your project Soluling can localize it.

Learn more about gettext/po localization.

Django

 

Flask

 

Samples

GitHub and <data-dir>\Samples\Python contains following samples:

Directory Description
Driving Shows how to localize a Python application.
Plural Shows how to create grammatically correct singular and plural messages.

In addition PO and PHP samples show how to localize PO files.