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>About Resource Bundles</title>
9
<link rel="StyleSheet" href="nbdocs://org.netbeans.modules.usersguide/org/netbeans/modules/usersguide/ide.css" type="text/css">
13
<h2>About Resource Bundles</h2>
14
<p><small><a href="#seealso">See Also</a> </small>
15
<p> Resource bundles store selected characteristics of an object as key and value
16
pairs in a set of <tt>.properties</tt> files. You can store a variety of characteristics
17
in resource bundles, like localized strings used to internationalize your code
18
or properties for an Ant script. The IDE displays resource bundles as properties
19
object nodes (<img src="./images/propertiesObject.gif" alt="Properties Object Node">)
20
that contain nodes for each of its locales (<img src="./images/propertiesLocale.gif" alt="Properties locale node icon">)
21
and keys (<img src="./images/propertiesKey.gif" alt="Properties key node icon">).
22
<!--PENDING : this info would be helpful in the Internationalization section-->
24
<h3>Editing Resource Bundles</h3>
25
<p>The IDE enables you to manage an object's properties that are stored in resource
27
<p>There are two primary ways of editing the properties files stored in resource
28
bundles in the IDE.</p>
30
<li><b>In the Source Editor.</b> You can edit properties files in the Source
31
Editor as standard text files. Initially, the default locale opens in the
32
enabling you to edit existing keys and their values.
33
<li><b>In the Properties Editor.</b> You can edit the key and value pairs for
34
all locales of a resource bundle in table layout. You can also add a new property
35
to all of the locales in your resource bundle.
38
<li>You can also manage a resource bundle's contents through the pop-up
39
menu available on its Files window nodes.</li>
41
<h3>Resource Bundles and Internationalization</h3>
42
<p>When used for internationalizing source code, the IDE stores each locale's
43
characteristics in a<tt> .properties</tt> file which is contained within the
44
resource bundle. Each key corresponds to the name of a property and
45
must be the same for each locale. The key value is the localized string displayed
46
by the object at runtime and can vary for each locale.
48
<li>Though resource bundles and locales are both <tt>.properties</tt> files, the
50
resource bundles and the locales they contain using different icons
51
in the Files window to avoid confusion.
53
<p>The IDE also enables you to automate the process of internationalizing your
54
source code. You can use the IDE's internationalization features to:
56
<li>Automatically replace hard-coded strings with internationalized ones</li>
57
<li>Insert new internationalized strings as you write code</li>
58
<li>Check your resource bundles to ensure they contain all of the necessary
63
<dt><a name="seealso">See Also</a></dt>
64
<dd><a href="creating_resourcebundles.html">Creating a Resource Bundle</a></dd>
65
<dd><a href="addingprops.html">Adding and Removing a Property</a></dd>
66
<dd><a href="addinglocale.html">Adding and Removing a Locale</a></dd>
69
<hr><small><a href="../credits.html">Legal Notices</a></small>
71
<table border="0" cellpadding="50">
72
<tr><td> </td></tr>