About this tutorial
This tutorial introduces you to the Java programming language's support for multilingual and multicountry environments. The course begins with a general discussion of internationalization principles and concepts, and then moves on to an overview of the specific areas of Java internationalization support. The last few sections provide a more hands-on discussion -- including example programs for the major discussion areas, and a final, more complete application that ties them together -- of the areas basic to any internationalized Java application: Unicode and Java characters; locales and resource bundles; and formatting dates, numbers, and currencies.
Upon completing the tutorial, you will have a firm understanding of the elements of internationalization and the areas for which the Java platform provides support. You should also be able to write applications that use resource bundles and can format and parse dates, numbers, and currencies.
If you are an intermediate Java programmer with some understanding of I/O and Swing, and have an interest in building international Java applications, then Java internationalization basics is for you. However, beginning to advanced developers will also be able to glean useful information and review material. In particular, every Java programmer should have an understanding of the discussions in the sections Unicode support and Java characters and the char datatype. All example code is explained, but the focus is on areas germane to internationalization, not general Java programming. Any prior exposure to internationalization is helpful when taking this tutorial, but no particular background is assumed.
Author's note: While I have some background in German and Russian, the words and phrases used in the examples are primarily the result of Internet dictionary research. I hope you will be amused rather than irritated by any poor or inappropriate word choices. Feel free to contact me with any corrections, linguistic or otherwise.
See Resources for a listing of tutorials, articles, and other references that expand upon the material presented here.
Although a release candidate for JDK 1.4 was available at the time the tutorial was written, JDK 1.3 is used to be applicable to the widest audience. Specifically, J2SE v1.3.1_02 on Windows NT 4.0, Service Pack 6a was used for testing the examples. There are only a few new items in 1.4 regarding internationalization and these changes or additions are mentioned in the appropriate sections. You should, of course, have the international version of any JDK/JRE.
Note that the code examples are intended to promote understanding of the basics and have not been optimized for production use.
The classes and source code for the examples used in this tutorial are available as a downloadable JAR file in Resources . The individual source files are also listed in Appendix A: Complete code listings .