Reputation: 1800
I have just finished developing an android application that I was asked to make. I had also planned to translate it in different languages; below you can see the tree of the folders/files:
Inside strings.xml
there are all the values that I am using inside the classes and they are all in Italian, my language (Here you can see an example if needed). I'd like to be able to translate all those fields in English and french as well.
I have read this article -> http://developer.android.com/training/basics/supporting-devices/languages.html
From what I have understood, I'd have to create a folder called values-fr
with a strings.xml
inside (it will have the same values names, but different translations).
QUESTION
I would like to be able to support English and Italian as well, but I don't understand how to manage the folders. Could you please tell me which option is the correct?
values
use strings.xml
with Italian (my language) strings. Then create another folder called values-en
and, like I did before, create strings.xml
with English valuesvalues
use strings.xml
with English strings. Then create another folder called values-it
and then, create strings.xml
with Italian valuesI guess that the point 2 is the correct solution but I'm not sure. The folder values
has English as default language?
Thanks for the attention.
Upvotes: 4
Views: 123
Reputation: 157457
Technically speaking both are valid. values/
is the fallback if a more specific qualifier is not found. There is no written rule that enforces you in having the English strings in values/
. It just makes a little more sense to have the English as fallback since it easier to find foreigners that speak English rather than Italian
Upvotes: 2