Skip to main content

By clicking Submit, you agree to the developerWorks terms of use.

The first time you sign into developerWorks, a profile is created for you. Select information in your profile (name, country/region, and company) is displayed to the public and will accompany any content you post. You may update your IBM account at any time.

All information submitted is secure.

  • Close [x]

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerworks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

By clicking Submit, you agree to the developerWorks terms of use.

All information submitted is secure.

  • Close [x]

Java internationalization basics

Joe Sam Shirah (joesam@conceptgo.com), Principal and developer, conceptGO
Joe Sam Shirah is a principal and developer at conceptGO, which provides remote consulting and software development services, as well as products, with specialties in JDBC, I18N, the AS/400, RPG, finance, inventory, and logistics. Joe Sam was presented with the Java Community Award at JavaOne, 1998, and is the author of the JDBC 2.0 Fundamentals short course at the Java Developer Connection. He is the moderator of the developerWorks "Java filter" discussion forum and manager for jGuru's JDBC, I18N, and Java400 FAQs. Joe Sam has a B.B.A. in Economics and a Master's degree in International Management.

Summary:  This tutorial introduces you to the Java programming language's support for multilingual and multicountry environments. The tutorial 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 of the areas basic to any internationalized Java application: Unicode and Java characters; locales and resource bundles; and formatting dates, numbers, and currencies.

Date:  23 Apr 2002
Level:  Introductory PDF:  A4 and Letter (202 KB | 64 pages)Get Adobe® Reader®

Activity:  32680 views
Comments:  

About this tutorial

What is this tutorial about?

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.


Should I take this tutorial?

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.


Code samples and installation requirements

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 .

1 of 11 | Next

Comments



static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Java technology
ArticleID=131609
TutorialTitle=Java internationalization basics
publish-date=04232002
author1-email=joesam@conceptgo.com
author1-email-cc=