Chapter 35: Internationalization Flashcards
Describe java's internationalization features. construct a locale with language, country, and variant. display date and time based on locale. display numbers, currencies, and percentages based on locale. to develop applications for international audiences using resource bundles. to specify encoding schemes for text I/O
1
Q
Why should we care about internationalization?
A
It would be very resource intense to create and maintain different language versions to satisfy international users. Java is designed to support different language needs. It doesn’t require custom code.
2
Q
Name 3 major java features support internationalization?
A
- Unicode. This is a universal 16-bit encoding scheme.
- Locale class. Encapsulates information about a specific locale. Helps us display date, time, number, locale-sensitive operations (like sorting strings) Formatting is in the java.text package.
- ResourceBundle class helps us separate locale-specific information, such as status messages and GUI component labels. the info is stored outside the source code and can be accessed and loaded dynamically at runtime from a ResourceBundle, rather than hard-coded into the program.
3
Q
What important internationalization feature comes with the Swing user-interface class?
A
the locale property is inherited from the Component class.
4
Q
What class formats data and time?
A
DateFormat