Android Strings (strings.xml)
Format, editor, and translation workflow for native Android app resources.
strings.xml is the standard Android resource file for app text. It is an XML file with <string name="key">value</string> entries plus <plurals> for pluralized text and <string-array> for ordered lists. Each language has its own strings.xml in a locale-specific folder under res/ (e.g. res/values/strings.xml for the default, res/values-de/strings.xml for German). The Android runtime picks the right file based on the device locale, with fallback to the default if a translation is missing.
- What it is: XML resource file with
<string>,<plurals>,<string-array> - File name:
strings.xml - Standard body: Android (Google)
- Encoding: UTF-8 (declared in XML header)
- Locale folders:
res/values-<locale>/strings.xml - Plurals: CLDR categories (one / few / many / other / zero / two)
- Used by: all native Android apps
What strings.xml looks like
An Android resource file declares strings, plurals, and arrays inside a <resources> root. Placeholders use Java printf-style format specifiers (%1$s, %d):
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Mein App</string>
<string name="welcome">Willkommen, %1$s!</string>
<plurals name="cart_items">
<item quantity="one">1 Artikel im Warenkorb</item>
<item quantity="other">%d Artikel im Warenkorb</item>
</plurals>
<string-array name="weekdays">
<item>Montag</item>
<item>Dienstag</item>
<item>Mittwoch</item>
</string-array>
</resources>Editing strings.xml
- Android Studio Translation Editor: right-click strings.xml → Open Translations Editor. Shows all locales side by side, flags missing translations, validates plural quantities. Best for solo work.
- Cloud TMS platforms: Locize, Phrase, Crowdin, Lokalise import strings.xml natively, including plurals and string arrays. Translators work in a CAT UI, not in XML.
- Text editors: only for spot fixes; the escaping rules (apostrophes, quotes, newlines, ampersands) are easy to break by hand.
Common Android translation workflows
- Adding a language. Create
res/values-<locale>/strings.xml, copy the default keys, translate the values. Android picks it up automatically based on device locale. - Translator handoff. Export the default strings.xml to a TMS, translate, import the resulting per-locale files into
res/values-<locale>/. - Right-to-left languages. Add
android:supportsRtl="true"to your manifest and usestart/endin layouts instead ofleft/right. Android handles mirroring; translation is just text. - Plural-aware code. Use
getQuantityString(R.plurals.key, count)for any count-aware text. Don't concatenate strings; Android won't pick the right plural form for that.
How to translate strings.xml in Locize
Locize imports and exports Android strings.xml files:
- Get started
- Import your
strings.xmlfile - Edit translations in the CAT view with translation memory, glossary, and style guide applied automatically
- Use bulk actions for AI / machine translation, then route results through a review workflow
- Export back to
strings.xmlper locale, or convert to JSON, XLIFF, or any other supported format
Frequently asked questions
strings.xml is the standard Android resource file for app text. It is an XML file with `<string name="key">value</string>` entries. Each language has its own strings.xml inside a locale-specific resources folder (e.g. `res/values/strings.xml` for the default, `res/values-de/strings.xml` for German). The Android runtime picks the right file based on the device locale.
Plurals use `<plurals>` instead of `<string>`, with `<item quantity="...">` children for each CLDR plural form (one, few, many, other, zero, two). At runtime call `getResources().getQuantityString(R.plurals.key, count)` and Android picks the right form based on the active locale's plural rules.
Create a `res/values-<locale>/strings.xml` folder for each language (e.g. `values-de`, `values-fr`, `values-es-rMX`). Copy the keys from the default `res/values/strings.xml` and translate the values. Android Studio has a Translation Editor (right-click strings.xml → Open Translations Editor) that shows all locales side by side.
Use `<string-array>` with `<item>` children for ordered lists (menus, dropdown options). Access at runtime with `getResources().getStringArray(R.array.key)`. Translate the items the same way you translate `<string>` entries, one array per language.
Apostrophes and quotes need escaping (`\\'`, `\\\"`). Newlines are `\\n`. To preserve leading/trailing whitespace, wrap the string in double quotes. The `&` character must be `&`. Android lint will catch most of these on build, but they are easy to miss when editing by hand.
Yes. Locize, Phrase, Crowdin, and Lokalise all import and export strings.xml natively, including plurals and string arrays. Translators work in a CAT-style UI without touching XML, and the export round-trips back to the locale folder structure Android expects.