You should see that now all the countries' names
are displayed in German:
Similarly, we can easily internationalize the names of the columns of the Grid
component. Let's do one more exercise. Create two files, ShowAll.properties and
ShowAll_de.properties in the com.packtpub.celebrities.pages package, as
explained above. Move the dateOfBirth-label message from app.properties
to ShowAll.properties, then put the following content into the ShowAll_
de.properties file (or make a legible translation if you know the language):
dateOfBirth-label=Geburt Datum
lastName-label=Letzter Name
firstName-label=Vorname
occupation-label=Besetzung
Chapter 7
[ 191 ]
Run the application, set the current locale to German and log in to see the collection.
Note the column titles of the table are in German now:
Guess what you need to do to internationalize the labels of the fields of
BeanEditForm? Exactly the same??”just provide an appropriate message catalog and
put messages into it with keys like firstName-label. The same holds true for error
messages and any other contents of message catalogs, of course, only the keys will be
different (like age-min-message, for example).
In fact, as soon as you realize that for any resource requested by the application,
Tapestry tries to find its localized version, you will see many different opportunities.
Pages:
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244