Over a million developers have joined DZone.

GWT i18n Overview

· Java Zone

Navigate the Maze of the End-User Experience and pick up this APM Essential guide, brought to you in partnership with CA Technologies

Google Web Toolkit is an out of the box set of APIs that allows developing Ajax applications easily using Java technology.

There is a need in certain applications to allow the user chooses the languages he prefers to see contents with, so as he can understand what the project is all about and can be therefore a potential customer.

GWT provides great support for internationalization (i18n), and this is true by providing specific classes to use :

  • Constants : Used when externalizing static constants to different languages.
  • ConstantsWithLookup : Used when externalizing static  constants to different languages like Constants interface, but adding the ability to load dynamically a value of a property at runtime.
  • Messages : Used when externalizing static constants with parameters to different languages.
  • Dictionary : Corresponds to a dictionary included to the host page at first page loading.
  • Localizable : specializes a class behaviour depending on the used locale.
  • DateTimeFormat & NumberFormat : utility classes provided to format dates and numbers at the client side.
  • CurrencyCodeMapConstants : currency dictionary to use directly in your application.

Moreover, GWT provides a command line tool called “i18Creator” to generate language properties file or interfaces automatically because doing this by hand could be a daunting task. “i18Sync” is another tool provided by GWT that takes in input language properties files and generates automatically interfaces as output.

Good luck with GWT i18n.

From http://www.misterj2ee.com/2010/09/gwt-i18n-overview/

Thrive in the application economy with an APM model that is strategic. Be E.P.I.C. with CA APM.  Brought to you in partnership with CA Technologies.


Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}