Dobes schrieb:
> I like the way GWT does it's localization and it would be great if I
> could use the same code in client AND server (especially, use it in my
> code that is shared between client and server).  Any idea how possible
> this is?

Actually there is no problem at all (OK there are two ;-)
On the server-side just create a resource-bundle, that is
reading in the property-files used by GWT to create the
localized HTML-pages.

Here comes the first problem. The property-files used for
GWT must be encoded in UTF-8, Java's resource-bundle
expects ISO-8859-1. But there are implementations out there
that can be used (GWT is using one as well that is mentioned
in the docs, so you might try that one out as well).

The other problem is that the algorithm used for loading
the correct resource-bundle differs from the one used
in GWT. Giving a Locale of e.g. "en_US" and the following
available resource-bundles

 - file_de.properties
 - file.properties

GWT loads file.properties all the time where Java loads
the de-files if the System-Locale is DE. As well, the
default-Locales of GWT for some languages are different
(AFAIK en_US instead of en_EN and es_AG instead of es_ES)
leading to funny effects when localizing e.g. currencies.


Regards, Lothar

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" 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/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to