I use GWT along with Spring/Hibernate/AOP. I use an Aspect to send notification emails.
In one of my Aspect, I want to get the current locale from GWT,so that I can send the localized email to the user.
Is there a way to access GWT Locale data from the client side?
Thanks
http://code.google.com/intl/es-ES/webtoolkit/doc/latest/DevGuideI18nLocale.html
has info about Locales in GWT.
I have two approaches:
1) session-less server: the method in the server that sends the email receives the locale from the client.
Let’s say the interface has a method:
My proposal is to convert it to
and call it from the GWT client in this way:
2) session-aware server: I don’t know if GWT allows using session… and… I prefer not to use it… but if you have to, you can send to the server the locale of the client and store it in the session…