Adding new string arrays

Create a new string array resource using the Localization Files Editor.

  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. Click (located immediately above the Localization Files Editor table). A new array with a single entry is added to the table, and the default key value is highlighted. Note that a warning icon () appears next to the key, indicating that the default strings file does not yet have a value defined for the key and index that identify the single array entry.
  3. Enter the key that will be used to access the new string array, replacing the default value that was generated when the new array was created.
  4. Click the disclosure triangle below and to the left of the array key to expose the array's entries.
  5. Enter string values for the row 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.
  6. With an of the array's rows selected, add additional array entries by clicking once for each entry, or by clicking the downward-pointing arrow to the right of this action and specifying the number of entries to be added. The new entry or entries are added to the end of the array. Fill in the string values for each new row in the appropriate columns as in the previous step.
  7. Select File > Save to save your changes.
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 .
Related tasks
Adding new strings
Editing a localized string array
Related reference
Localization Files Editor
Related information
Which Resources Take Precedence?