DEV Community

Cover image for Translating strings.xml and XLIFF without breaking it
Georgi Kalchev
Georgi Kalchev

Posted on Originally published at aiskills402.com

Translating strings.xml and XLIFF without breaking it

A translated Android strings.xml or XLIFF file breaks on apostrophes, placeholders, plural categories and lost inline codes. What to keep and what to check.

Two file types carry most mobile translation work: the Android strings.xml resource file and the XLIFF interchange file that translation tools exchange. A translated copy of either one can be perfectly readable to a person and still be wrong for the machine that reads it next. In strings.xml the usual culprits are an unescaped apostrophe, a placeholder that was reworded, an @ or ? that Android treats as special, a plural list that follows the source language instead of the target one, and markup that lost its protection. In XLIFF the usual culprits are a missing or doubled target, a changed inline code, a state value that tells the tool the wrong thing, and a language attribute that was…

Read the full report on AISkills402: https://aiskills402.com/blog/android-xliff-translation-build-breaks?utm_source=devto&utm_medium=social

Top comments (0)