Skip to main content
Android string resource XML stores application messages under Android resource directories. Use this guide for Android resources rather than generic XML; file paths affect parser selection. Supported extensions: .xml.

Source file

Save this example as app/src/main/res/values/strings.xml.

Configure your files

Use this i18n.yml for the example, or add its file mapping to your existing bucket. See path templates for other layouts.

Translate

Install the CLI and set OPENAI_API_KEY in your project’s .env.local or shell. You can also configure another AI provider.
The dry run previews the work. The second command writes translations to the configured target path and updates the lockfile.

Behavior and limitations

  • Android parsing requires a path matching **/res/values*/strings.xml. Other XML paths use the generic XML parser.
  • String resource names become keys. Plural quantities become dotted keys such as items.one.
  • Resources marked translatable="false" are skipped. Comments, attributes, namespaces, and printf placeholders are preserved.
  • Translatable <string-array> resources are unsupported. Use Android resource qualifiers in target paths; the example maps Spanish explicitly.

Next steps