Opened 17 years ago

Closed 17 years ago

Last modified 17 years ago

#3877 closed (duplicate)

Newforms and i18n bug

Reported by: Olive Owned by: hugo
Component: Internationalization Version: dev
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


Here is how I define a form in my views:

class MyForm(forms.Form):

name = forms.CharField(label=_('Name'))

The problem is _('Name') is translated when I restart the server
(Django or Apache),
but not when I switch the browser locale.

I tried both
from django.utils.translation import gettext_lazy as _
from django.utils.translation import gettext as _

Change History (2)

comment:1 Changed 17 years ago by anonymous

Resolution: duplicate
Status: newclosed

Duplicate: #3600

comment:2 Changed 17 years ago by Malcolm Tredinnick

Thanks. I thought this was already reported somewhere, but I couldn't find it.

Note: See TracTickets for help on using tickets.
Back to Top