OCP Question 5, Explanation

Which two statements are true about localizing an application?

A. Support for new regional languages does not require recompilation of the code.
B. Textual elements (messages and GUI labels) are hard-coded in the code.
C. Language- and region-specific programs are created using localized data.
D. Resource bundle files include data and currency information.
E. Language codes use lowercase letters and region codes use uppercase letters.


The correct answer is AE.


Option A can be answered by borrowing directly from Java Internationalization Support:

An internationalized program has the following characteristics:

  • With the addition of localization data, the same executable can run worldwide.
  • Textual elements, such as status messages and the GUI component labels, are not hardcoded in the program. Instead they are stored outside the source code and retrieved dynamically.
  • Support for new languages does not require recompilation.
  • Culturally-dependent data, such as dates and currencies, appear in formats that conform to the end user’s region and language.
  • It can be localized quickly.

As for option E, this is what javadoc on the java.util.Locale class says:

  • The language field is case insensitive, but Locale always canonicalizes to lower case.
  • The country (region) field is case insensitive, but Locale always canonicalizes to upper case.

Prep notes on Localization are here.

Leave Comment

Your email address will not be published.