Version 4.10.0

Package hirondelle.web4j.ui.translate

Translation of text for multilingual applications.


Interface Summary
Translator Translate base text into a localized form.

Class Summary
Messages Custom tag for rendering a MessageList.
Text Custom tag for translating base language text (or a "coder key") into a localized form, and applying "wiki-style" formatting.
TextFlow Custom tag for translating regular text flow in large sections of a web page.
Tooltips Custom tag for translating TITLE, ALT and submit-button VALUE attributes in markup.
Translation Model Object for a translation.
Translation.LookupResult The result of Translation.lookUp(String, Locale, Map).

Package hirondelle.web4j.ui.translate Description

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".


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 ResourceBundle

Although a Translator may be backed by a ResourceBundle, the recommended style is to use a database instead. ResourceBundle is a mediocre tool for web applications.

Version 4.10.0

Copyright Hirondelle Systems. Published October 19, 2013 - User Guide - All Docs.