src/cm/utils/i18n.py
author Simon Descarpentries <sid@sopinspace.com>
Fri, 07 Mar 2014 18:18:46 +0100
changeset 598 fd0507590413
parent 0 40c8f766c9b8
permissions -rw-r--r--
668 tests, 80% of the workspace tested

from django.utils.translation.trans_real import translation

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