src/cm/utils/i18n.py
author gibus
Mon, 29 Nov 2010 14:12:38 +0100
changeset 339 0508284129cf
parent 0 40c8f766c9b8
permissions -rw-r--r--
Open automatically reply to comment form when comment_op url parameter is set to "reply", *even if there is no reply yet* (therefore no animation should have been triggered)

from django.utils.translation.trans_real import translation

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