Newforms label translation fails
|Reported by:||Timo||Owned by:||Adrian Holovaty|
|Severity:||Keywords:||newforms translation internationalization|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||yes|
Newforms' labels can be translated with gettext during initialization.
class TestForm(forms.Form): name = forms.CharField(label=capfirst(_('name')), max_length=255)
But this works only at first time. If you want to change your language during session ('/i18n/setlang/') the labels are not translated to the new language you are requesting.
Change History (10)
comment:6 Changed 10 years ago by
|Patch needs improvement:||set|
|Triage Stage:||Ready for checkin → Accepted|