Formats / Android strings.xml

strings.xml, with the escaping that stops your build

Android has two rules that fail in opposite directions, and both are easy to get wrong by hand.

strings.xml

An unescaped apostrophe breaks the build; an escaped one shows a backslash

aapt rejects a bare apostrophe inside a string resource, so a French or Italian translation stops the build rather than shipping wrong. Escape one that did not need it and the user sees a literal backslash on screen.

Linguiqo escapes on the way out and unescapes on the way in, so what a translator types is what a user reads, and what the build gets is what aapt accepts. The pair is applied in opposite order in each direction, which is the part a hand-rolled script usually misses.

Quantity strings are plurals with Android's own spelling

A plurals element holds item elements keyed by quantity: zero, one, two, few, many, other. Which of those a language actually uses is decided by CLDR, not by the file, and writing an item a language never selects is dead weight the build still ships.

Linguiqo writes exactly the categories the target language uses.

Questions

Will it keep my string arrays?

No. Only strings and quantity strings are read and written, so an exported file has no string-array elements. Keep arrays in a separate resource file that Linguiqo does not map.

Does it handle translatable="false"?

Strings marked not translatable stay out of the translator's queue.

Upload a Android strings.xml file and see

The demo reads a real file of yours and shows what came back. No account, nothing kept.

Open the demo

What Linguiqo is