src/cm/utils/i18n.py
author gibus
Fri, 28 Jan 2011 11:09:34 +0100
changeset 343 7bc8d8bfe443
parent 0 40c8f766c9b8
permissions -rw-r--r--
open source -> free software

from django.utils.translation.trans_real import translation

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