I'm just learning about Tapestry, so I'm not sure if there are more
sophisticated techniques built in. But in general this should be pretty easy
with a basic JSON serializer. With this you can easily write out something
like:

var localizedMessages = { message1: "Some en-US message.", message2:
"Another en-US message.", ... };

which you can then access from with:

localizedMessages.message1 or localizedMessages ["message1"];

Sorry if this is all obvious to you and I totally missed the point.

Chris


Chris Lewis-5 wrote:
> 
> Hello all,
> 
> I'm working on a mixin that adds functionality to text input controls, 
> and I'd like to provide localized messages on the client side from my 
> message catalog. I don't want to mess with ajax for this as I feel it'd 
> be an overkill, so I'd like some suggestions. I'm thinking of providing 
> a type of transfer object to the JS code - basically just a hash of 
> messages generated on the server side from the message catalog. I don't 
> want my JS class to be bound to Tapestry as it could easily be 
> implemented in any web app, but I do want localized messages.
> If anyone has other ideas or feedback on my own, I'd greatly appreciate
> it.
> 
> sincerely,
> chris
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/T5%3A-localized-messages-in-javascript-tf4595831.html#a13130817
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to