O'Reilly logo

Special Edition Using Java 2 Standard Edition by Geoff Friesen, Chuck Cavaness, Brian Keeton

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

An Example: InternationalizationTest

To better understand how all this fits together, take a look at this simple Java application that makes use of several of the features discussed in this chapter.

The simple application takes up to three command-line parameters that specify a locale and uses this information to

  • Display some information about the default locale and the one entered.

  • Try to load a ResourceBundle corresponding to the specified locale and print out what the Bundle contains.

  • Display the date, localized to the specified locale.

Besides the main application class called InternationalizationTest.java, the program requires three other files. The three files are .properties files that correspond to three supported locales. They will get ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required