[webkit-dev] How to deal with localized strings

Michelangelo De Simone micdesim at gmail.com
Mon Aug 24 11:07:07 PDT 2009


Hi guys,

I'm gonna implement the support to the "validationMessage" HTML5 DOM
attribute of form control elements, it shall return a string that
describes which validation state the element is in.
AFAIK this should be a localized string to be presented to the user: I
tought to write a simple: enum ValidationMessage {STD_MSG1, STD_MSG2,
etc...} in HTMLFormControlElement to have a simple representation of
the standard messages and then leave the localization to the embedder.

In order to accomplish this in
HTMLFormControlElement::validationMessage() I should return the
localized string obtained from the embedder and this is the trouble I
went into: how such a thing is usually done in WebKit?

I'd appreciate any help you may provide. Thank you.

-- 
Bye,
Michelangelo, a future ex-gsocer


More information about the webkit-dev mailing list