How to make sure every string from particular xml is translated in another xml in Android? Any good practices?

+2 votes
asked Mar 29, 2012 by suitup

Lets say i have 2 languages in 2 different xmls, when I develop my app, I create more strings in strings.xml. Sometimes I don't want to translate it right away, sometimes I can forget. How can I later check and compare both xmls and make sure everything is translated?

1 Answer

+3 votes
answered Nov 29, 2018 by jeffrey-blattman

use Android Lint,

It specifically checks for just that case.



Summary: Checks for incomplete translations where not all strings are translated

Priority: 8 / 10 Severity: Fatal Category: Correctness:Messages

If an application has more than one locale, then all the strings declared in one language should also be translated in all other languages.

By default this detector allows regions of a language to just provide a subset of the strings and fall back to the standard language strings. You can require all regions to provide a full translation by setting the environment variable ANDROID_LINT_COMPLETE_REGIONS.

if you are using a recent ADT, you can run it directly from eclipse by right clicking your project > android tools > run lint.

Welcome to Q&A, where you can ask questions and receive answers from other members of the community.
Website Online Counter