Try: IS_IN_DB(db, db.t_title.id, lambda r: T(r.name), orderby=db.t_title.id)
The label argument to IS_IN_DB can be a function that takes a Row object and returns a label for that row. Anthony On Tuesday, August 21, 2012 9:12:22 AM UTC-4, Pradeeshnarayan wrote: > > In my application I have to specify a title field as below > > Field('title', type='string',label=T('Title'),requires=IS_IN_DB(db, > db.t_title.id, '%(name)s',orderby=db.t_title.id)) > > all the title options are mentioned in the t_title table. > For example in t_title table I have values Mr. and Mrs. For english > language this is fine. > But for german language I have to display Herr and Frau. > > How can I set language translation 'T()' to title values. So I can add the > corresponding title names in other language files. > > I would greatly appreciate any suggestions. > > > --