JILTing Your Code

Nothing to do with jilting your lover, JILT is Sun’s Java Internationalization and Localization Toolkit, Version 2.0. JILTing your code means processing it with JILT, which facilitates I18N and L10N’ing the Java classes. JILT has four GUI-based tools, which can be used independently, started from a GUI front-end called JILKIT. Figure 14-1 shows JILT in action.

JILT in action

Figure 14-1. JILT in action

The tools are listed in Table 14-2.

Table 14-2.  JILT programs

Tool

Function

I18N Verifier

Tests program for international use and suggests improvements.

Message Tool

Finds and allows you to edit hardcoded or inconsistent messages.

Translator

Translates messages in a resource bundle file into a given locale/language.

Resource Tool

Merges multiple resource files into a new resource bundle. Can also find differences between resource files.

It’s worth noting that the time to learn these tools may overshadow their benefits on small projects, but on large projects will likely prove worthwhile.

Version 2 of the Translator ships with a Chinese dictionary, but you can provide your own dictionaries as well.

The Java Internationalization and Localization Toolkit can be downloaded for free from Sun’s Java page, http://java.sun.com/products/.

Get Java Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.