src/cm/utils/i18n.py
author Yves-Marie Haussonne <ymh.work+github@gmail.com>
Thu, 08 May 2014 11:43:45 +0200
changeset 649 fcf5309284df
parent 0 40c8f766c9b8
permissions -rw-r--r--
Correct test of text to take into account the text tag order+ augment test timeout

from django.utils.translation.trans_real import translation

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