Answer the question
In order to leave comments, you need to log in
Module for program localization?
Good afternoon!
For example, we are talking about backend, and there is a function
def getError(user):
return _('Error', lang=user.get_lang())
Answer the question
In order to leave comments, you need to log in
Misunderstood, in gettext this is possible.
def getError(user):
local_gettext = gettext.translation('myapplication', languages=[user.get_lang()])
_ = local_gettext.ugettext
return _('Error')
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question