i18n translate messages from validators

21 views
Skip to first unread message

Daniel Crisan

unread,
Jun 16, 2013, 1:01:53 PM6/16/13
to we...@googlegroups.com
I'm using the instructions from http://webpy.org/cookbook/runtime-language-switch . However, I'm unable to translate text from validators added to a form. Does anybody knows how can I do this?

I only have to setup some language at login and then use the same language. All works except the text from validators:
 form.Validator(_("not_empty"), lambda x:len(x)>0),
returns
 NameError: name '_' is not defined

Thank you

--
This message is confidential. It may also be privileged or otherwise protected by work product immunity or other legal rules. If you have received it by mistake please let me know by reply and then delete it from your system; you should not copy the message or disclose its contents to anyone.
Reply all
Reply to author
Forward
0 new messages