src/cm/utils/i18n.py
author gibus
Fri, 05 Oct 2012 10:21:07 +0200
changeset 470 077be006891e
parent 0 40c8f766c9b8
permissions -rw-r--r--
Fix filtering of teachers' comments for individual students in role_teacher role model when using DECORATED_CREATORS.

from django.utils.translation.trans_real import translation

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