13.6. Dynamic string internationalization
Outside the world of GWT, it’s common to provide i18n translations as JavaScript objects that are used either on the server side or in the client. If you’re incrementally building a GWT application, or even sharing i18n files with other applications, you might already have these assets that you want to reuse.
This is where GWT’s dynamic i18n approach comes in. You load translations into the application as JavaScript objects and access them via GWT’s Dictionary class.
What you lose is access to the compiler stripping out unused data and confidence that there will be no missing data at runtime, and you have to build all of the support for pluralization and selection that you got for free in the static ...
Get GWT in Action, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.