How can I make list or set translatable using gettext?
Posted
by Thomas
on Stack Overflow
See other posts from Stack Overflow
or by Thomas
Published on 2010-05-21T10:37:07Z
Indexed on
2010/05/21
10:40 UTC
Read the original article
Hit count: 207
I have some structure in Python:
gender=( ('0','woman'), ('1','man') )
I want translate it before I will display it in Django template. Unfortunatelly below sollution don't work:
from django.utils.translation import ugettext_lazy as _
gender=( ('0',('woman')), ('1',('man')) )
What I must do to translate this. I readed something in: link text but I can't understand what I should do.
© Stack Overflow or respective owner