I am developing an application which the user can select a language and It will show a message lets say for example "Hello" in a different language.
I have created a spinner.The user will select whatever language he/she wants to translate "Hello".
Here is my code on selecting items on the spinner. I dont know what to do next. How can I get the values from the folder values-es(Spanish), values-fi(Finnish) and so on.
public void onItemSelected(AdapterView<?> parent, View view, int pos,
long id) {
int position = parent.getSelectedItemPosition();
switch (position) {
case 0: // English
break;
case 1:// Spanish
//Display the value on values-es/strings.xml
break;
case 2:// Finnish
//Display the value on values-fi/strings.xml
break;
case 3:// French
//Display the value on values-fr/strings.xml
break;
case 4:// Protuguese
//Display the value on values-pt/strings.xml
break;
default:
break;
}