src/cm/utils/i18n.py
author gibus
Tue, 11 Mar 2014 11:06:37 +0100
changeset 606 52f3e090eed9
parent 0 40c8f766c9b8
permissions -rw-r--r--
make django tests working again, from ymh, see http://www.iri.centrepompidou.fr/dev/hg/comt/rev/e103299bccc0

from django.utils.translation.trans_real import translation

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