h3.Internationalization & Localization Code Samples
With the Java programming language, it is possible to internationalize and localize your programs. Internationalization is the process of designing an application so it can be adapted to various languages and regions without engineering changes. Localization is the process of adapting software for a specific region or language by adding locale-specific components and translating text.
* [#Formatting]
* [#Localization]
h5.Formatting
* [ChoiceFormatDemo.java|http://java.sun.com/docs/books/tutorial/i18n/format/examples/ChoiceFormatDemo.java] shows how to handle plural forms in internationalized programs. For more information, see The Java Tutorial Continued: Internationalization.
* [DateFormatDemo.java|http://java.sun.com/docs/books/tutorial/i18n/format/examples/DateFormatDemo.java] formats dates and times with predefined styles in a locale-specific way. For more information, see [The Java Tutorial Continued: Internationalization|http://java.sun.com/docs/books/tutorial/i18n/].
* [DateFormatSymbolsDemo.java|http://java.sun.com/docs/books/tutorial/i18n/format/examples/DateFormatSymbolsDemo.java] shows how to change the short names for the days of the week from lowercase to uppercase. For more information, see [The Java Tutorial Continued: Internationalization|http://java.sun.com/docs/books/tutorial/i18n/].
* [DecimalFormat.java|http://java.sun.com/docs/books/tutorial/i18n/format/examples/DecimalFormatDemo.java] formats decimal numbers into locale-specific strings. For more information, see [The Java Tutorial Continued: Internationalization|http://java.sun.com/docs/books/tutorial/i18n/].
* [MessageFormatDemo.java|http://java.sun.com/docs/books/tutorial/i18n/format/examples/MessageFormatDemo.java] demonstrates how to internationalize a compound message. For more information, see [The Java Tutorial Continued: Internationalization|http://java.sun.com/docs/books/tutorial/i18n/].
* [NumberFormat.java|http://java.sun.com/docs/books/tutorial/i18n/format/examples/NumberFormatDemo.java] shows how to format numbers, currencies, and percentages. For more information, see [The Java Tutorial Continued: Internationalization|http://java.sun.com/docs/books/tutorial/i18n/].
* [SimpleDateFormatDemo.java|http://java.sun.com/docs/books/tutorial/i18n/format/examples/SimpleDateFormatDemo.java] shows how to create your own customized formats for dates and times. For more information, see [The Java Tutorial Continued: Internationalization|http://java.sun.com/docs/books/tutorial/i18n/].
h5.Localization
* [Available.java|http://java.sun.com/docs/books/tutorial/i18n/locale/examples/Available.java] identifies the types of Locale definitions a locale-sensitive class recognizes by returning the language and country codes in a string format. For more information, see The Java Tutorial Continued: Internationalization.
* [ListDemo.java|http://java.sun.com/docs/books/tutorial/i18n/resbundle/examples/ListDemo.java] shows how to use a list of language and country codes to support a number of locales. For more information, see [The Java Tutorial Continued: Internationalization|http://java.sun.com/docs/books/tutorial/i18n/].
* [Locales on a JSP page|http://java.sun.com/developer/technicalArticles/Intl/MultilingualJSP/index.html#code1] from [Developing Multilingual Web Applications Using JavaServer Pages Technology|http://java.sun.com/developer/technicalArticles/Intl/MultilingualJSP/index.html].
* [PropertiesDemo.java|http://java.sun.com/docs/books/tutorial/i18n/resbundle/examples/PropertiesDemo.java] demonstrates how to create and use properties files to localize a program for various language and country codes. For more information, see [The Java Tutorial Continued: Internationalization|http://java.sun.com/docs/books/tutorial/i18n/].
* [StatsBundle_en_CA.java|http://java.sun.com/docs/books/tutorial/i18n/resbundle/examples/StatsBundle_en_CA.java] is the Canadian English version of the statistics bundle for the [ListDemo.java|http://java.sun.com/docs/books/tutorial/i18n/resbundle/examples/ListDemo.java] program. For more information, see [The Java Tutorial Continued: Internationalization|http://java.sun.com/docs/books/tutorial/i18n/].
* [StatsBundle_fr_FR.java|http://java.sun.com/docs/books/tutorial/i18n/resbundle/examples/StatsBundle_fr_FR.java] is the French as spoken in France version of the statistics bundle for the [ListDemo.java|http://java.sun.com/docs/books/tutorial/i18n/resbundle/examples/ListDemo.java] program. For more information, see [The Java Tutorial Continued: Internationalization|http://java.sun.com/docs/books/tutorial/i18n/].
* [StatsBundle_ja_JP.java|http://java.sun.com/docs/books/tutorial/i18n/resbundle/examples/StatsBundle_ja_JP.java] is the Japanese version of the statistics bundle for the [ListDemo.java|http://java.sun.com/docs/books/tutorial/i18n/resbundle/examples/ListDemo.java] program. For more information, see [The Java Tutorial Continued: Internationalization|http://java.sun.com/docs/books/tutorial/i18n/].
----
With the Java programming language, it is possible to internationalize and localize your programs. Internationalization is the process of designing an application so it can be adapted to various languages and regions without engineering changes. Localization is the process of adapting software for a specific region or language by adding locale-specific components and translating text.
* [#Formatting]
* [#Localization]
h5.Formatting
* [ChoiceFormatDemo.java|http://java.sun.com/docs/books/tutorial/i18n/format/examples/ChoiceFormatDemo.java] shows how to handle plural forms in internationalized programs. For more information, see The Java Tutorial Continued: Internationalization.
* [DateFormatDemo.java|http://java.sun.com/docs/books/tutorial/i18n/format/examples/DateFormatDemo.java] formats dates and times with predefined styles in a locale-specific way. For more information, see [The Java Tutorial Continued: Internationalization|http://java.sun.com/docs/books/tutorial/i18n/].
* [DateFormatSymbolsDemo.java|http://java.sun.com/docs/books/tutorial/i18n/format/examples/DateFormatSymbolsDemo.java] shows how to change the short names for the days of the week from lowercase to uppercase. For more information, see [The Java Tutorial Continued: Internationalization|http://java.sun.com/docs/books/tutorial/i18n/].
* [DecimalFormat.java|http://java.sun.com/docs/books/tutorial/i18n/format/examples/DecimalFormatDemo.java] formats decimal numbers into locale-specific strings. For more information, see [The Java Tutorial Continued: Internationalization|http://java.sun.com/docs/books/tutorial/i18n/].
* [MessageFormatDemo.java|http://java.sun.com/docs/books/tutorial/i18n/format/examples/MessageFormatDemo.java] demonstrates how to internationalize a compound message. For more information, see [The Java Tutorial Continued: Internationalization|http://java.sun.com/docs/books/tutorial/i18n/].
* [NumberFormat.java|http://java.sun.com/docs/books/tutorial/i18n/format/examples/NumberFormatDemo.java] shows how to format numbers, currencies, and percentages. For more information, see [The Java Tutorial Continued: Internationalization|http://java.sun.com/docs/books/tutorial/i18n/].
* [SimpleDateFormatDemo.java|http://java.sun.com/docs/books/tutorial/i18n/format/examples/SimpleDateFormatDemo.java] shows how to create your own customized formats for dates and times. For more information, see [The Java Tutorial Continued: Internationalization|http://java.sun.com/docs/books/tutorial/i18n/].
h5.Localization
* [Available.java|http://java.sun.com/docs/books/tutorial/i18n/locale/examples/Available.java] identifies the types of Locale definitions a locale-sensitive class recognizes by returning the language and country codes in a string format. For more information, see The Java Tutorial Continued: Internationalization.
* [ListDemo.java|http://java.sun.com/docs/books/tutorial/i18n/resbundle/examples/ListDemo.java] shows how to use a list of language and country codes to support a number of locales. For more information, see [The Java Tutorial Continued: Internationalization|http://java.sun.com/docs/books/tutorial/i18n/].
* [Locales on a JSP page|http://java.sun.com/developer/technicalArticles/Intl/MultilingualJSP/index.html#code1] from [Developing Multilingual Web Applications Using JavaServer Pages Technology|http://java.sun.com/developer/technicalArticles/Intl/MultilingualJSP/index.html].
* [PropertiesDemo.java|http://java.sun.com/docs/books/tutorial/i18n/resbundle/examples/PropertiesDemo.java] demonstrates how to create and use properties files to localize a program for various language and country codes. For more information, see [The Java Tutorial Continued: Internationalization|http://java.sun.com/docs/books/tutorial/i18n/].
* [StatsBundle_en_CA.java|http://java.sun.com/docs/books/tutorial/i18n/resbundle/examples/StatsBundle_en_CA.java] is the Canadian English version of the statistics bundle for the [ListDemo.java|http://java.sun.com/docs/books/tutorial/i18n/resbundle/examples/ListDemo.java] program. For more information, see [The Java Tutorial Continued: Internationalization|http://java.sun.com/docs/books/tutorial/i18n/].
* [StatsBundle_fr_FR.java|http://java.sun.com/docs/books/tutorial/i18n/resbundle/examples/StatsBundle_fr_FR.java] is the French as spoken in France version of the statistics bundle for the [ListDemo.java|http://java.sun.com/docs/books/tutorial/i18n/resbundle/examples/ListDemo.java] program. For more information, see [The Java Tutorial Continued: Internationalization|http://java.sun.com/docs/books/tutorial/i18n/].
* [StatsBundle_ja_JP.java|http://java.sun.com/docs/books/tutorial/i18n/resbundle/examples/StatsBundle_ja_JP.java] is the Japanese version of the statistics bundle for the [ListDemo.java|http://java.sun.com/docs/books/tutorial/i18n/resbundle/examples/ListDemo.java] program. For more information, see [The Java Tutorial Continued: Internationalization|http://java.sun.com/docs/books/tutorial/i18n/].
----