Translation of text for multilingual applications.

Last-Second Localization

WEB4J's goal is to make the task of changing a single-language application into a multilingual one as painless and as focused as possible, with minimal ripple effects. To support this idea, WEB4J has two main design goals :

To achieve the first goal, WEB4J uses a policy of "last-second localization", whereby translations are performed outside of normal code, and only in Java Server Pages, using custom tags. This corresponds to the idea that a translation is "just a view".

Overview

The various items are :

Translatable Items

Translatable items include :

Suggested Development Style

For a new multilingual application, one may proceed as follows :

If an existing application needs to be changed from a single-language style to a multilingual style, then a similar technique may be used.

Database versus {@link java.util.ResourceBundle}

Although a {@link hirondelle.web4j.ui.translate.Translator} may be backed by a ResourceBundle, the recommended style is to use a database instead. ResourceBundle is a mediocre tool for web applications.