Editing a localized string

Use the Localization Files Editor to create localized versions of text strings used in your applications.

  1. 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 Open With > Other. 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. 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.
  2. 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.)
  3. 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.
  4. Select File > Save to save your changes.
Related tasks
Editing a localized string array
Adding new strings
Related reference
Localization Files Editor
Related information
Which Resources Take Precedence?