Message handling is an important task in application development. For example, it is almost always required that an application is able to display error messages that are easy to understand. Also, nowadays it is often a requirement that an application be able to “speak” many languages. A technique for developing applications that support multiple languages and data formats without having to rewrite the programming logic is called internationalization. Internationalization is abbreviated i18n because the word starts with an i and ends with an n, and there are 18 characters between the first i and the last n. In addition, localization is the technique of adapting an internationalized application to support a specific locale. A locale is a specific geographical, political, or cultural region. An operation that takes a locale into consideration is said to be locale-sensitive. For example, displaying a date is locale-sensitive because the date must be in the format used by the country or region of the user. The 15th day of November 2005 is written as 11/15/2005 in the US, but written as 15/11/2005 in Australia. Localization is abbreviated l10n because the word starts with an l and ends with an n and there are 10 letters between the l and the n.
With internationalization, you can change the visual text in an application quickly and easily. Java has built-in supports for this feature that enables an application to change language without the need for recompilation.
Struts makes use of this feature and was designed to support internationalization from the beginning. For example, the message tag in the Struts Bean Tag Library is capable of selecting a message in the correct language. However, since it is a recommendation to use JSTL instead of Struts’ tag libraries, I will also discuss the internationalization-related tags in JSTL.