Adding new strings

Create a new string using the Localization Files Editor by adding a new row.

  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.
  2. Right-click anywhere within the Localization Files Editor table and select Add Key. The New Row dialog appears.
  3. Ensure that Add new is set to String.
  4. In the Row key field, enter the key that will be used to access the new string.
  5. Click OK. A new, empty row is added to the table identified by the supplied key. Note that a warning icon () appears next to the key, indicating that the default strings file does not yet have a value defined for this key.
  6. Enter string values for the key in the appropriate columns. Generally you will enter a default, or base, string in the values column and localized versions of that string in columns for those locales in which the default string is not appropriate. Note that you can enter multi-line string values by pressing the Return key between lines.
  7. Select File > Save to save your changes.
To remove a string simply right-click within the row and select Remove Key.
Related tasks
Adding new string arrays
Editing a localized string
Related reference
Localization Files Editor
Related information
How Android finds the best matching directory