One of the most powerful and useful features of the Tapestry framework is the way in which it assists with localization of a web application. This is normally an ugly area in web applications, with tremendous amounts of ad-hoc coding necessary.
Because Tapestry does such a strong job of seperating the presentation of a component (its HTML template) from its control logic (its specification and Java class) it becomes easy for it to perform localization automatically. It's as simple as providing additional localized HTML templates for the component, and letting the framework select the proper one.
However, the static text of an application, provided by the HTML templates, is not all.
Applications also have assets (images, stylesheets and the like) that must also be localized: that fancy button labeled "Search" is fine for your English clients, but your French clients will require a similar button labeled "Recherche".
Again, the framework assists, because it can look for localized versions of the assets as it runs.
The locale application demostrates this. It is a very simply application that demonstrates changing the locale of a running application [7]
A demonstration of localization is built into the Workbench, under the L10N [8] tab. The page allows the user to select a new language for the application:
Selecting "German" from the list and clicking the "Change" button brings you to a new page that acknowledges your selection:
Clicking the button (it's labeled "Return" in German) returns you to the L10N page to select a new language:
The neat thing here is that the L10N page has been localized into German as well; it shows equivalent German text, the options in the popup list are in German, and the "Change" button has been replaced with a German equivalent.