Use the Localization Files Editor to create localized versions of text string arrays used in your
applications.
-
Launch the Localization Files Editor using one of the following methods:
- Double-click res/values/strings.xml (or any of the localized strings.xml files in your project).
- Right-click res/values/strings.xml (or any of the localized strings.xml files in your project) and select . From the Editor Selection dialog, select
Localization Files Editor and click OK.
The Localization Files Editor appears, showing the base (or default) strings file and any localized
strings files. If it does not exist, the default strings file (values/strings.xml) will be
created. Within the editor each column (other than the Key column) represents a unique
locale. Each row represents a single text string, identified by a key and an integer array index. A cell
contains the version of the row's string localized for the column's locale. In Android, if a given cell is
blank, at runtime the operating system picks the column that best matches the current locale (and has a value
for the row), falling back on the default string value for that key if necessary (the column labeled
values contains these default string values). See the Android documentation for a
complete description of the algorithm the operating system uses to determine the resource file that best
matches the device's current locale.
-
If desired, hide columns to simplify the editing process.
To hide a column, right-click anywhere within the Localization Files Editor table, select Show
Columns, and then select the column to be hidden. (Repeat this step to show a previously hidden
column.)
-
Edit or enter text strings into the table cells as appropriate. Note that by looking across a given row you
can see which locales have unique translations and which rely on the default string value. By looking down a
given column you can see which strings are localized for that column's locale, and which rely on the default
string value. Also note that you can enter multi-line string values by pressing the Return key between lines.
- To add additional entries to the array, click any of the array's rows to select it and then click
(Add Array Item). Note that you can add
multiple entries by clicking the downward-pointing arrow to the right of the Add Array Item action and
specifying the number of entries to be added.
- To remove an individual array entry simply click within the row to select it and then click
. To remove an entire string array, click the table
row that contains the array's key and then click
.
-
Select to save your
changes.