Android strings.xml localization with AI
Android res/values/strings.xml with <string>, <plurals> and <string-array>.
.xmlformat: android-xmlone file per locale
What it is
Android resources live in res/values/strings.xml for the default language and res/values-es/strings.xml, res/values-pt-rBR/strings.xml for others.
Example
app/src/main/res/values/strings.xml
<resources> <!-- Toolbar title --> <string name="inbox_title">Inbox</string> <string name="greeting">Hello, %1$s!</string> <plurals name="unread"> <item quantity="one">%d unread message</item> <item quantity="other">%d unread messages</item> </plurals> <string name="app_name" translatable="false">Glossa</string></resources>How Glossa handles it
- Plurals
- <plurals> elements become plural entries and are written with the quantity items each locale needs.
- Comments and context
- XML comments directly above an element are kept as context.
- Placeholders
- %1$s, %d and other printf specifiers are protected, along with inline HTML tags such as <b>.
- Round trip
- Attributes such as translatable="false" and formatted are kept with the key and written back. Escaping follows aapt rules (\', \", \n, quoted sections) in both directions.
Translate it from the command line
Push the source-language file; strings are deduplicated against the rest of your workspace and queued for translation. Pull writes app/src/main/res/values/strings.xml back in the same format.
npx @meterapp/glossa loginnpx @meterapp/glossa push app/src/main/res/values/strings.xml --project appnpx @meterapp/glossa pull --project app --locale es,de,jaOr ask an agent over MCP: “Push app/src/main/res/values/strings.xml to Glossa and pull Spanish.” It calls push_file and pull_file. See the CLI and MCP guides.
Other formats
Xcode String CatalogFlutter ARBJSON (key/value, i18next)YAML (Rails i18n)Apple .stringsApple .stringsdictGettext PO/POTXLIFF 1.2 / 2.0Java .properties.NET RESXCSV / TSV (multi-locale)
Moving from Crowdin? Read the comparison.