Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#3877 closed (duplicate)

Newforms and i18n bug

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


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 9 years ago by anonymous

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate: #3600

comment:2 Changed 9 years ago by mtredinnick

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