src/cm/utils/i18n.py
author raph
Fri, 11 Jun 2010 11:04:23 +0200
changeset 282 b5deb8e32219
parent 0 40c8f766c9b8
permissions -rw-r--r--
add STORE_ACTIVITY_IP parameter to avoid storing ips for activities. (workaround for #50)

from django.utils.translation.trans_real import translation

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