src/cm/utils/i18n.py
author Simon Descarpentries <sid@sopinspace.com>
Tue, 18 Feb 2014 19:27:58 +0100
changeset 579 869f02c75687
parent 0 40c8f766c9b8
permissions -rw-r--r--
daily progress : suite/test style, config from single config file, attempt to test i18n in footer

from django.utils.translation.trans_real import translation

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