Issue
I have a res/values
folder containing a strings.xml
file and a res/values-XX
folder containing a strings.xml
file (for each of the languages XX
I support). At the moment, all my strings.xml
files contain the same strings (same string names, different string values). Is there a way I can add a string to the res/values/strings.xml
file without having to add it to all my res/values-XX/strings.xml
files, and such that the app will pick up on this default string regardless of the phone's language setting? At the moment the compiler aborts and complains that the string has not been translated for each of my supported languages.
Solution
The "compiler" will not "abort" because you have an untranslated string. You may get lint errors, but ant clean debug
, ant clean release
, and their Eclipse equivalents work fine. Make sure you are on the current edition of the SDK tools (and the ADT plugin if you are using Eclipse).
To get rid of the lint errors, have your <resources>
element where the untranslated string appears look like this:
<resources xmlns:tools="http://schemas.android.com/tools" tools:ignore="MissingTranslation">
Answered By - CommonsWare
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.