blob: 4d24001122a0c72d9dfe6bd22332f819285a9b59 [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="en">
<head>
<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2016. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>
Externalize Strings Wizard
</title>
<link rel="stylesheet" href="../book.css" charset="ISO-8859-1" type="text/css">
</head>
<body>
<h1>
Externalize Strings Wizard
</h1>
<p>
The Externalize Strings wizard allows you to refactor a compilation unit such that strings used in the compilation unit can be translated to different languages. The wizard can be invoked on new, unprocessed files, but also modify
already translated pages. It also allows you
revert changes done by a previous invocation of the wizard.
</p>
<p>
On the first page of the wizard you can specify how the strings found in the compilation unit should be externalized. It is also possible to internalize strings
which have been externalized before.
</p>
<table border="1" cellspacing="0" cellpadding="5" width="100%" summary="Externalize strings wizard settings">
<thead>
<tr>
<th>
<p>
Field
</p>
</th>
<th>
<p>
Description
</p>
</th>
</tr>
</thead>
<tbody>
<tr>
<td valign="top">
<p>
Use Eclipse's string externalization mechanism
</p>
</td>
<td valign="top">
<p>
If unchecked the standard externalization mechanism is used, otherwise the new
<a href="http://dev.eclipse.org/viewcvs/index.cgi/~checkout~/platform-core-home/documents/3.1/message_bundles.html">Eclipse string externalization mechanism</a> is used.
<br><em>Note:</em> This field is only present if the project build path contains the <code>org.eclipse.osgi.util.NLS</code> class.
</p>
</td>
</tr>
<tr>
<td valign="top">
<p>
Enter common prefix for generated keys
</p>
</td>
<td valign="top">
<p>
Specifies an optional prefix for all newly generated key. A good practice is to use the name of the compilation unit so entries in the property files can easily be grouped.
</p>
</td>
</tr>
<tr>
<td valign="top">
<p>
Strings to externalize
</p>
</td>
<td valign="top">
<p>
Displays the list of all strings in the file. When non-externalized strings are found, the list ill be filtered to only show the new strings with proposed keys and values. To control this filter, use the checkbox on top of the table.
</p>
</td>
</tr>
<tr>
<td valign="top">
<p>
Externalize
</p>
</td>
<td valign="top">
<p>
Marks the selected strings to be externalized. Externalized strings will be placed in a property file
and the code will be changed to a lookup to the property file.
</p>
</td>
</tr>
<tr>
<td valign="top">
<p>
Ignored
</p>
</td>
<td valign="top">
<p>
Marks the selected strings to be ignored from externalization. These strings
will be marked with a '//$NON_NLS' comment and the compiler will ignore this
string when warning about non-externalized strings.
</p>
</td>
</tr>
<tr>
<td valign="top">
<p>
Internalize
</p>
</td>
<td valign="top">
<p>
Marks the selected strings to be internalized again: This brings the code
back in its original state before the externalize wizard was applied: The entry
in the property file will be removed, and a '//$NON_NLS' comment
will be removed.
</p>
</td>
</tr>
<tr>
<td valign="top">
<p>
Edit...
</p>
</td>
<td valign="top">
<p>
Opens a dialog for entering a new key.
</p>
</td>
</tr>
<tr>
<td valign="top">
<p>
Context
</p>
</td>
<td valign="top">
<p>
Displays the occurrence of the string in the context of the compilation unit.
</p>
</td>
</tr>
<tr>
<td valign="top">
<p>
Accessor class
</p>
</td>
<td valign="top">
<p>
The class used to access the property file. Press <strong>Configure...</strong> to open the <strong>Configure Accessor Class</strong> dialog.
</p>
</td>
</tr>
</tbody>
</table>
<h2 class="Head">
Configure Accessor Class
</h2>
<p>
This dialog specifies the name and location of the property file and its accessor class. An accessor class is used to retrieve strings
stored in the property file given a key.
</p>
<p>
Accessor class settings:
</p>
<table border="1" cellspacing="0" cellpadding="5" width="100%" summary="Accessor class settings">
<thead>
<tr>
<th>
<p>
Option
</p>
</th>
<th>
<p>
Description
</p>
</th>
</tr>
</thead>
<tbody>
<tr>
<td valign="top">
<p>
Source folder
</p>
</td>
<td valign="top">
<p>
The source folder to store the accessor class in.
</p>
</td>
</tr>
<tr>
<td valign="top">
<p>
Package
</p>
</td>
<td valign="top">
<p>
The location for the accessor class.
</p>
</td>
</tr>
<tr>
<td valign="top">
<p>
Class name
</p>
</td>
<td valign="top">
<p>
The name of the class to access the resource bundle.
</p>
</td>
</tr>
<tr>
<td valign="top">
<p>
Substitution pattern
</p>
</td>
<td valign="top">
<p>
Specifies the source pattern to replace the string to externalize with.
</p>
</td>
</tr>
</tbody>
</table>
<p>
Property file settings:
</p>
<table border="1" cellspacing="0" cellpadding="5" width="100%" summary="Property file settings">
<thead>
<tr>
<th>
<p>
Option
</p>
</th>
<th>
<p>
Description
</p>
</th>
</tr>
</thead>
<tbody>
<tr>
<td valign="top">
<p>
Source folder
</p>
</td>
<td valign="top">
<p>
The source folder to store the property file in.
</p>
</td>
</tr>
<tr>
<td valign="top">
<p>
Package
</p>
</td>
<td valign="top">
<p>
The location for the property file.
</p>
</td>
</tr>
<tr>
<td valign="top">
<p>
Property file name
</p>
</td>
<td valign="top">
<p>
The name of the property file.
</p>
</td>
</tr>
</tbody>
</table>
<p>
<h3 class="related">Related concepts</h3>
<p>
<a href="../concepts/concept-string-externalization.htm">String externalization</a><br>
<a href="../../org.eclipse.platform.doc.isv/reference/misc/message_bundles.html">Eclipse string externalization mechanism</a>
</p>
<p>
<h3 class="related">Related tasks</h3>
<p>
<a href="../tasks/tasks-206.htm">Externalizing strings</a>
</p>
<p>
<h3 class="related">Related references</h3>
<p>
<a href="../reference/ref-menu-source.htm">Source actions</a>
</p>
</body>
</html>