Book Image

Tapestry 5: Building Web Applications

Book Image

Tapestry 5: Building Web Applications

Overview of this book

Table of Contents (17 chapters)
Tapestry 5
Credits
About the Author
About the Reviewers
Preface
Foreword
Where to Go Next

Providing a German Message Catalog


What we have done so far is an example of internationalization—we made the page able to display itself in different languages by moving all of its textual messages and labels into message catalogs. Now we need to localize the page into the German locale by providing a German message catalogs.

Whenever Tapestry retrieves some file for the needs of the application—a page template, an image, a message catalog or almost anything else—it tries to do that in a proper locale. For this, it tries to find a file with an appropriate, locale-specific suffix appended to the file name. If the current locale of the application is German, and Tapestry wants to find a message catalog for the Start page, it will be looking for a file named Start_de.properties. If the current locale is English, Tapestry will be looking for the Start_en.properties file. If it finds such a file, it uses it, if not, it uses the default file, without any suffixes, which is called Start.properties...