71 lines
4.7 KiB
HTML
71 lines
4.7 KiB
HTML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE html
|
|
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html lang="en-us" xml:lang="en-us">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
<meta name="security" content="public" />
|
|
<meta name="Robots" content="index,follow" />
|
|
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
|
|
<meta name="DC.Type" content="reference" />
|
|
<meta name="DC.Title" content="Examples: Creating an internationalized Java program" />
|
|
<meta name="abstract" content="If you need to customize a Java program for a specific region of the world, you can create an internationalized Java program with Java locales." />
|
|
<meta name="description" content="If you need to customize a Java program for a specific region of the world, you can create an internationalized Java program with Java locales." />
|
|
<meta name="DC.Relation" scheme="URI" content="international.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="gettime.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="charenc.htm" />
|
|
<meta name="copyright" content="(C) Copyright IBM Corporation 2006" />
|
|
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 2006" />
|
|
<meta name="DC.Format" content="XHTML" />
|
|
<meta name="DC.Identifier" content="crtinter" />
|
|
<meta name="DC.Language" content="en-us" />
|
|
<!-- All rights reserved. Licensed Materials Property of IBM -->
|
|
<!-- US Government Users Restricted Rights -->
|
|
<!-- Use, duplication or disclosure restricted by -->
|
|
<!-- GSA ADP Schedule Contract with IBM Corp. -->
|
|
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
|
|
<link rel="stylesheet" type="text/css" href="./ic.css" />
|
|
<title>Examples: Creating an internationalized Java program</title>
|
|
</head>
|
|
<body id="crtinter"><a name="crtinter"><!-- --></a>
|
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
|
<h1 class="topictitle1">Examples: Creating an internationalized Java program</h1>
|
|
<div><p>If you need to customize a Java™ program for a specific region of the
|
|
world, you can create an internationalized Java program with Java locales.</p>
|
|
<div class="section"><p><a href="javaapi/guide/intl/locale.doc.html" target="_blank">Java locales</a>.</p>
|
|
<p>Creating an internationalized Java program
|
|
involves several tasks:</p>
|
|
<ol><li>Isolate the locale-sensitive code and data. For example, strings, dates,
|
|
and numbers in your program.</li>
|
|
<li>Set or get the locale using the Locale class.</li>
|
|
<li>Format dates and numbers to specify a locale if you do not want to use
|
|
the default locale.</li>
|
|
<li>Create resource bundles to handle strings and other locale-sensitive data.</li>
|
|
</ol>
|
|
<p>Review the following examples, which offer ways to help you complete
|
|
the tasks required to create an internationalized Java program:</p>
|
|
<ul><li><a href="intdatex.htm">Example: Internationalization of dates using
|
|
the java.util.DateFormat class</a></li>
|
|
<li><a href="intnumex.htm">Example: Internationalization of numeric display
|
|
using the java.util.NumberFormat class</a></li>
|
|
<li><a href="intlocex.htm">Example: Internationalization of locale-specific
|
|
data using the java.util.ResourceBundle class</a></li>
|
|
</ul>
|
|
<p>For more information about internationalization, see the following:</p>
|
|
<ul><li><a href="../nls/rbagsglobalmain.htm" target="_blank"><span class="keyword">i5/OS™</span> globalization</a></li>
|
|
<li><a href="javaapi/guide/intl/index.html" target="_blank">Internationalization
|
|
by Sun Microsystems, Inc.</a></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="international.htm" title="You can customize your Java programs for a specific region of the world by creating internationalized Java program. By using time zones, locales, and character encoding, you can ensure that your Java program reflects the correct time, place, and language.">Internationalization</a></div>
|
|
</div>
|
|
<div class="relconcepts"><strong>Related concepts</strong><br />
|
|
<div><a href="gettime.htm" title="When you have Java programs that are sensitive to time zones, you should configure the time zone on your server so that your Java programs use the correct time.">Time zone configuration</a></div>
|
|
<div><a href="charenc.htm" title="Java programs can convert data in different formats, enabling your applications to transfer and use information from many kinds of international character sets.">Java character encodings</a></div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html> |