Issue
I read on Android Developers' Supporting Different Languages
that in order for your application to support multiple language, you have to make multiple values folder inside your "res" folder - "values", "values-es", "values-fr". Say in your original English "values" folder you also had colors.xml
, and dimens.xml
, would you need to copy those over into each language "values" folder?
The document only says
At runtime, the Android system uses the appropriate set of string resources based on the locale currently set for the user's device.
which I interpreted as "Android will use strings.xml from the right folder".
If you could, I think it would be good to reduce redundancy if you only have colors.xml
and dimens.xml
in one folder(all the others could share)
Solution
You only need a separate file (strings.xml, colors.xml, dimen.xml etc.) if you want to override the default values (in the values folder). Usually colors and dimensions are language independent so there's no need to create those files in the language specific folders.
Answered By - Emanuel Moecklin
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.