Android provides a very simple way to localize apps: string resources.
You need to provide several strings.xml files.
Each in a directory called /res/values-xy
, where xy is the language (i.e.: es
, fr
, en
, de
, it
, ...).
Then just refer these strings in your project, like R.string.my_string_name
(in Java) or @string/my_string_name
(in xml)
For reference: http://developer.android.com/training/basics/supporting-devices/languages.html
[EDIT]
Same goes for arrays: just use /res/values-xy/arrays.xml
Note: the names strings.xml
and arrays.xml
are just conventional
ones can be changed to anything you like better.