#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 |
Description
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 _
and
from django.utils.translation import gettext as _
Change History (2)
comment:1 by , 18 years ago
Resolution: | → duplicate |
---|---|
Status: | new → closed |
comment:2 by , 18 years ago
Thanks. I thought this was already reported somewhere, but I couldn't find it.
Note:
See TracTickets
for help on using tickets.
Duplicate: #3600