Create a new locale using the Localization Files Editor by adding a new column.
-
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.
-
Create a new column.
- To create a new, empty column, right-click anywhere within the Localization Files Editor table and
select Add Column.
- To create a new column that is a copy of an existing column, right-click within the column to be
copied and select Clone.
The New column dialog appears.
-
In the New column dialog, enter a localization file ID. For Android applications
this is the name of the resource directory in which the new strings.xml file will be
created; see http://developer.android.com/guide/topics/resources/resources-i18n.html#AlternateResources for information on constructing this directory name.
The Localization Files Editor validates the localization file ID as you enter it; you cannot create a new
column if the name is already in use or is otherwise invalid.
-
In the newly created column, add or edit locale-specific text in one or more cells.
The newly created column is the right-most in the table. You can hide (or show) columns to better see
which cells correspond to which keys. In particular, you may want to hide all columns except Key (which cannot be hidden), the default string values column, and your new column.
-
Select to save your
changes.
The new directory and strings.xml file are created.
To remove a locale simply right-click within the column and select Remove Column.
Note that the XML file corresponding to the locale will be deleted only when you save the project. Also note that
you are warned if you attempt to delete the default file (values/strings.xml), and it will be
recreated with blank values the next time you open the Localization Files Editor.