Summary
In this chapter we have internationalized only one page of the Celebrity Collector
application and only one enumeration, but as soon as you know the basics, you
should be able to continue work, and easily internationalize the remaining pages.
What you have discovered about support of internationalization in Tapestry can be
summarized as follows:
First of all, we need to tell Tapestry which language this web
application is going to support by providing a list of locales in the
contributeApplicationDefaults method of the AppModule class.
To internationalize labels, messages and other string resources, we provide
message catalogs (root as well as page-specific) in all supported languages,
name the files properly, and then insert localized messages into the page
templates using one of the few available approaches.
To display an internationalized image, we provide as many images as
there are supported locales, name them appropriately and then make them
available for the page as assets (there are two ways we can do that).
If a page contains a lot of text, it can be more efficient to use localized
templates for it, rather than to localize it paragraph-by-paragraph.
To internationalize enumerations, the Grid and BeanEditForm components
used in the application, we simply provide appropriate messages in the
message catalogs.
Pages:
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246