Are you doing: from django.utils.translation import ugettext_lazy as _ ? or: from django.utils.translation import ugettext as _ ?
The first one shoud work. Rgds, Marcos On Tue, Feb 8, 2011 at 7:11 PM, Ivo Brodien <i...@brodien.de> wrote: > If I import some tuple which is used for choices in a forms.RadioSelect > widget, then the choices don’t get translated > > models.py: > > BOOL_CHOICES = ((True, _(u'Yes')), (False, _(u'No'))) > > forms.py: > > from models import BOOL_CHOICES > > 1) does work an translates the choices > form.fields['accomdation'].widget = forms.RadioSelect(choices = ((True, > _(u’Yes')), (False, _(u'No')))) > > 2) does not translate the choices > form.fields['accomdation'].widget = forms.RadioSelect(choices = > BOOL_CHOICES) > > > something similar happens for a label > > STATIC = _(u”mystring”) > > ...label = STATIC does not work > ...label = _(STATIC) does work > > > Is this a bug or a desired behavior or am I missing something? > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-users@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > -- Some people, when confronted with a problem, think “I know, I'll use regular expressions.” Now they have two problems. Jamie Zawinski, in comp.emacs.xemacs -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.