http://web2py.com/book/default/chapter/04?search=default+language#T-and-Internationalization
Look at default language in this page... Also default depend of you browser setting... Richard On Thu, Jun 30, 2011 at 3:55 PM, Martin Weissenboeck <[email protected]>wrote: > Great, thank you - it solves the "_value"-problem. > > But the other problem is not solved: I get only the translated version > (German), not dependig on the selected language. > I have tried it with T.force('fr-fr') [there is no French translation]. I > have expected 'Yes' and 'No', but I got again 'Ja' and 'Nein'. > > And: how to set the default value? > > > 2011/6/30 Bruno Rocha <[email protected]> > >> IS_IN_SET( [ ('Y',T('Yes')), ('N',T('No')) ] ) >> >> Is in set, can receive a list of tuples, where first element is value, >> second is text. >> >> >> On Thu, Jun 30, 2011 at 4:31 PM, Martin Weissenboeck >> <[email protected]>wrote: >> >>> Hi, >>> >>> I want to use a SQLFORM with a checkbox. I have tried >>> >>> ... Field('my_question', >>> >>> requires=[IS_IN_SET([T('Yes'),T('No')]),], >>> >>> widget=SQLFORM.widgets.checkboxes.widget, >>> >>> default=T('No'), >>> >>> ),... >>> >>> I got a nice form with the German translations 'Ja' and 'Nein'. >>> But now I did not get the English version. >>> >>> A SELECT like >>> >>> ... SELECT( >>> OPTION(T('Yes'), _value='Y'), >>> OPTION(T('No'), _value='N'), >>> ) ... >>> >>> >>> works depending on the T-language, but I don't know how to put a >>> "_values" into the SQLFORM. >>> >>> Any hints? >>> Regards, Martin >>> >> >> >> >> -- >> >> >> >> -- >> Bruno Rocha >> [ About me: http://zerp.ly/rochacbruno ] >> [ Aprenda a programar: http://CursoDePython.com.br ] >> [ O seu aliado nos cuidados com os animais: http://AnimalSystem.com.br ] >> [ Consultoria em desenvolvimento web: http://www.blouweb.com ] >> >> > >

