Skip to content

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.

Key facts
  • 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 use start/end in layouts instead of left/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:

  1. Get started
  2. Import your strings.xml file
  3. Edit translations in the CAT view with translation memory, glossary, and style guide applied automatically
  4. Use bulk actions for AI / machine translation, then route results through a review workflow
  5. Export back to strings.xml per locale — or convert to JSON, XLIFF, or any other supported format

Frequently asked questions

What is an Android strings.xml file?

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.

How do plurals work in Android strings.xml?

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.

How do I create translated strings.xml files?

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.

What about string arrays?

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.

How do I handle special characters in strings.xml?

Apostrophes and quotes need escaping (`\\'`, `\\\"`). Newlines are `\\n`. To preserve leading/trailing whitespace, wrap the string in double quotes. The `&` character must be `&amp;`. Android lint will catch most of these on build, but they are easy to miss when editing by hand.

Can I edit strings.xml in a TMS?

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.

Translate Android strings.xml without the XML.
Import, edit with translation memory, glossary and AI, review, and export — all in one place.