Hi all,
I'm having some troubles with FormEncode and internationalization.
What I'm trying to do is to make FE to display properly translated
messages for those form fields that are not valid. After a lot of
trials and errors I found that (using paster shell):
>>> formencode.api.set_stdtranslation(domain='FormEncode', languages=['it'])
>>> formencode.api._stdtrans('Please enter a value')
works as expected and I get the translated message. However:
>>> pylons.decorators.formencode_gettext('Please enter a value')
gives me the original message (i.e. in english). What I don't
understand here is that in pylons/decorators/__init__.py there is the
following import statament:
from formencode.api import _stdtrans as formencode_gettext
so calling pylons.decorators.formencode_gettext() should give the same
result as calling formencode.api._stdtrans(). But it doesn't!
It's like the former set_stdtranslation() call has no effect when I
call _stdtrans() from within pylons. But I really don't understand
what's going on here. Any help?
TIA,
Andrea
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"pylons-discuss" 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/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---