1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
3
* Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved.
4
* Use is subject to license terms.
8
<title>Internationalizing a Set of Files With the Internationalization Wizard</title>
9
<link rel="StyleSheet" href="nbdocs://org.netbeans.modules.usersguide/org/netbeans/modules/usersguide/ide.css" type="text/css">
13
<h2>Internationalizing a Set of Files With the Internationalization Wizard</h2>
14
<p> <small><a href="#seealso">See Also</a> </small>
15
<p>The Internationalization wizard enables you to replace hard-coded strings with
16
internationalized strings in multiple files. If you are localizing the source
17
into more than one language, the Internationalization wizard also lets you specify
18
the localized string for multiple locales.</p>
20
<p> <b>To automatically internationalize strings in multiple source files:</b>
22
<li>Choose Tools > Internationalization
23
> Internationalization
24
Wizard from the main window.</li>
25
<li>Click Add Source(s) to add one or more source files to internationalize.
26
Click Next to proceed.</li>
27
<li>Click Select All if you want a single resource bundle to contain the key and
28
value pairs for all the listed sources. To select a resource bundle for specific
29
source files, select the desired sources and click Select Resource.
30
In the Select Resource dialog, select the
31
desired <tt>.properties</tt> file or create a new file.
32
Click Next to proceed.
37
<li>Modify additional values (Advanced Wizard only). You can create a variable
38
that points to the resource bundle. The variable is then used in the method
39
calls, which retrieve the localized strings. You must use the <tt>{identifier}.getString("{key}")</tt>
40
format to access the resource bundle through a variable.
42
<!--PENDING : language overly vague - explain why this is useful via context-->
45
<li>This feature is available for Java
46
sources only and not for other types of files, such as JavaServer Pages
47
<small><sup>TM</sup></small>. To use this feature, set the Advanced Wizard
48
property in the Internationalization settings to True.
51
<p>To modify key and value pairs:
53
<li>From the Source combo box, select the source file in which you want
54
to create the variable. </li>
55
<li>Select the Generate Field checkbox and set the variable's modifiers.</li>
56
<li>Type the name of the identifier in the Identifier text field.</li>
57
<li>The Init String field gives you a preview of the code that the variable
58
will use to reference the resource bundle. To change this code, click
59
Format and select the desired code format from the Init Code Format Editor.
61
<li>Click Next to generate the field.</li>
63
<li>In the Modify Found Strings pane, set the key name and localized values
64
for each of the strings you want to internationalize by entering a new value
65
in the appropriate column. Use the Source combo box to switch between source
66
files. Deselect the checkbox in the first column for any string you do not
67
want to internationalize.
69
<li>To change the code format used to generate the internationalized string
70
or add arguments to the method call, click the ellipsis button (...) at the
71
end of the string's row.</li>
72
<li>Click Finish to internationalize the strings for all of the selected source
77
<dt><a name="seealso">See Also</a></dt>
78
<dd><a href="autoinsert.html">Internationalizing a Single File</a></dd>
79
<dd><a href="manualinsert.html">Inserting an Internationalized String Into Source Code</a></dd>
80
<dd><a href="custominter.html">Configuring Internationalization Settings</a></dd>
83
<hr><small><a href="../credits.html">Legal Notices</a></small>
85
<table border="0" cellpadding="50">
86
<tr><td> </td></tr>