[Zope3-Users] Internationalization and Javascript
Fred Drake
fdrake at gmail.com
Sat Jul 9 17:38:25 EDT 2005
On 7/9/05, Santi Camps <scamps at earcon.com> wrote:
> I'm not able to find any way to internationalize this alert message.
> Anybody knows some way to do it ?
I haven't tried this myself, but you should be able to put the message
in an HTML element that is hidden by the CSS, and internationalize
that (by calling zope.i18n.translate() before inserting it into the
generated HTML). The JavaScript would then look for the HTML element
(by id or a class and relative location to the input element; whatever
works), and use that for the alert.
A little tedious, but not too bad for JavaScript, and your message
catalogs could be used to support whatever languages you care about
with further impacting the widget or application code.
-Fred
--
Fred L. Drake, Jr. <fdrake at gmail.com>
Zope Corporation
More information about the Zope3-users
mailing list