Articles Tagged i18n

Tornado and pgettext

Tornado and pgettext

Recently (26.05.2015) new tornado 4.2 was released. It contains different updates, the most valuable i suppose are modules tornado.locks and tornado.queues. They migrated from package Toro, look detailed explanation in Jesse Jiryu Davis post.

Here i want to tell about another helpful function, that was added with my help - pgettext.

It can be useful, when you are creating the translation for ambiguous strings. Let's say we have word "bat ...

Posted on 2015-06-05

Tornado i18n and l10n

Tornado i18n and i10n

Let's talk about i18n, i10n and tornado implementation. This post have a lot of text, but i wanted to describe many things that i faced during realization of i18n in tornado project. The step by step instruction is placed in the second part of this article.

Common definitions

i18n

i18n - shorthand from internationalization. It mean the process of multiple languages support in application. It is not the translation itself, but technical part of the ...

Posted on 2015-01-31

Multilanguage site on django without redirects

Starting from django 1.4, it is possible to set url prefix for each activated language. For example, we want site, that will have russian and english version.

To do it, add following to settings.py:

    # default language, it will be used, if django can't recognize user's language
    LANGUAGE_CODE = 'ru'

    # list of activated languages
    LANGUAGES = (
        ('ru', 'Russian'),
        ('en', 'English'),
    )

    # enable django’s translation system
    USE_I18N = True

    # specify path for translation files
    LOCALE_PATHS = (
        os ...

Posted on 2013-02-26