src/cm/utils/i18n.py
author gibus
Fri, 11 May 2012 13:25:05 +0200
changeset 423 db95e6b3fc6e
parent 0 40c8f766c9b8
permissions -rw-r--r--
Better positionning of table of contents.

from django.utils.translation.trans_real import translation

def translate_to(value, language_code):
    t = translation(language_code)    
    return getattr(t, 'gettext')(value)