Re: Translation is not working on ModelForm when widget is specified for form field

2015-10-30 Thread Sinwar Prem
okkk now i dont hv time whenever i get ill let u know On 30 October 2015 at 17:20, Sean Xu wrote: > Hi Andréas, > > I have now applied your second approach and now the field names get > translated into Chinese as expected... > Thanks so much. > > On Friday, October 30,

Re: Translation is not working on ModelForm when widget is specified for form field

2015-10-30 Thread Sean Xu
Hi Andréas, I have now applied your second approach and now the field names get translated into Chinese as expected... Thanks so much. On Friday, October 30, 2015 at 6:12:21 PM UTC+8, Andréas Kühne wrote: > > Hi, > > The problem is that you are redifining the fields, the fields then don't >

Re: Translation is not working on ModelForm when widget is specified for form field

2015-10-30 Thread Andreas Kuhne
Hi, The problem is that you are redifining the fields, the fields then don't get any labels (because you haven't specified them). You can achieve what you want in two ways: Either add the following to your modelform: start_time = forms.DateTimeField(label=_("start time"),

Translation is not working on ModelForm when widget is specified for form field

2015-10-30 Thread Sean Xu
Hi, I was learning Django Translation using django-swingtime as project with Django 1.7.9 installed. And I found out when Non-default widgets was originally specified for form fields, the preferred language did not show up from my Firefox browser. The problem has gone when these widgets were