Over a million developers have joined DZone.

GWT i18n Overview

DZone's Guide to

GWT i18n Overview

· Java Zone ·
Free Resource

Verify, standardize, and correct the Big 4 + more– name, email, phone and global addresses – try our Data Quality APIs now at Melissa Developer Portal!

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/

Developers! Quickly and easily gain access to the tools and information you need! Explore, test and combine our data quality APIs at Melissa Developer Portal – home to tools that save time and boost revenue. Our APIs verify, standardize, and correct the Big 4 + more – name, email, phone and global addresses – to ensure accurate delivery, prevent blacklisting and identify risks in real-time.


Opinions expressed by DZone contributors are their own.

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

{{ parent.tldr }}

{{ parent.urlSource.name }}