The translation is triggered by the accept-language in browser
settings.
You can force it with

T.force('en-du')

On Dec 10, 3:09 am, annet <[EMAIL PROTECTED]> wrote:
> Yarko,
>
> Thanks for pointing me to page 138 of the manual, I replaced 'date'
> with type='date'.
>
> Massimo,
>
> It still isn't working.
>
> This is the table definition of event:
>
> db.define_table('event',
>     SQLField('bedrijf', db.bedrijf, default='', notnull=True),
>     SQLField('event', length=50, default='', notnull=True),
>     SQLField('vandatum', type='date', default='', notnull=True,),
>     SQLField('totdatum', type='date', default='', notnull=True),
>     SQLField('duur', length=10, default='', notnull=True),
>     SQLField('plaatsnaam', length=40, default='', notnull=True),
>     SQLField('locatie', length=50),
>     SQLField('omschrijving', type='text'),
>     SQLField('sleutelwoord', db.sleutelwoord, default='',
> notnull=True, ondelete='RESTRICT'),
>     SQLField('doelgroep', db.doelgroep, default='', notnull=True,
> ondelete='RESTRICT'),
>     SQLField('scope', db.scope, default='', notnull=True,
> ondelete='RESTRICT'),
>     migrate='event.table')
>
> db.event.bedrijf.requires=IS_IN_DB(db, 'bedrijf.id', '%(bedrijfsnaam)
> s')
> db.event.event.requires=[IS_LENGTH(50), IS_NOT_EMPTY()]
> db.event.vandatum.requires=[IS_DATE(format=T('%Y-%m-%d')), IS_NOT_EMPTY
> ()]
> db.event.totdatum.requires=[IS_DATE(format=T('%Y-%m-%d')), IS_NOT_EMPTY
> ()]
> db.event.duur.requires=[IS_LENGTH(10), IS_NOT_EMPTY()]
> db.event.plaatsnaam.requires=[IS_IN_DB(db, 'plaats.plaatsnaam', '%
> (plaatsnaam)s')]
> db.event.locatie.requires=IS_LENGTH(50)
> db.event.sleutelwoord.requires=IS_IN_DB(db, 'sleutelwoord.id', '%
> (woord)s')
> db.event.doelgroep.requires=IS_IN_DB(db, 'doelgroep.id', '%(doelgroep)
> s')
> db.event.scope.requires=IS_IN_DB(db, 'scope.id', '%(scope)s')
>
> In the controller I built the following form:
>
>  form=form_factory(SQLField('plaatsnaam',label='Type een
> plaatsnaam',requires=IS_NOT_EMPTY(),\
>         widget=lambda self, value:TAG[''](
>             INPUT
> (_id='eventplaatsnaam',_name='plaatsnaam',_class='ac_input',_type='text'))),
>         SQLField('vandatum',type='date',label='Selecteer een van
> datum',requires=[IS_DATE(format=T('%Y-%m-%d')),IS_NOT_EMPTY()]),
>         SQLField('dagen',label='Selecteer een aantal
> weken',requires=IS_IN_SET([14,28,56],labels=['2 weken','4 weken','8
> weken'])))
>
> Furthermore, I created  an en-nl.py language file (or should it be en-
> du.py, since it is the Dutch language) in which I set the following
> translations:
>
> Original                                Translation
> %Y-%m-%d                        ***%d-%m-%Y
> %Y-%m-%d %H:%M:%S       ***%d-%m-%Y %H:%M:%S
>
> Do I have to force web2py explicitly to use this language file? If so,
> how do I accomplish that. If not, what else do I have to do to get
> this to work.
>
> Best regards,
>
> Annet.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to