Possible Duplicate:
How can I create a multilingual android application?
I am creating application and i am in the testing phase, but i want to make my application multilingual.
How can i make it multilingual ? What is the best way to make it ?
Possible Duplicate:
How can I create a multilingual android application?
I am creating application and i am in the testing phase, but i want to make my application multilingual.
How can i make it multilingual ? What is the best way to make it ?
The thing that you need to do is to create new folders in your res
folder.
Example : If you need to add support to spanish and italian you need to do it like this :
res folder
1.1 values
1.2 values-es // spanish
1.3 values-it // italian
And after that you need to create string.xml
files in values-es
and values-it
. And in all files you just need to create all string which you want to use like this :
<string name="title">Title</string> // in values folder
<string name="title">Title in Spanish</string> // in values-es folder
and etc.
And after that you can use these string as :
TextView text = (TextView) findViewById(R.id.textView);
text.setText(getString(R.string.title));
And this should work.
Take a look at this tutorial about localizing applications: http://developer.android.com/resources/tutorials/localization/index.html.
Maybe it helps.
Numerous examples are available that can help you create multilingual app in android.
Have a look on these articles :
http://developer.android.com/resources/tutorials/localization/index.html
http://www.icanlocalize.com/site/tutorials/android-application-localization-tutorial/
this will help you to create multilingual app in android.