0

I am working on a bilingual app menu. I am currently at a dilemma on how I would be able to switch the languages easy. At first I thought I could use String.xml file to store the data passed out in English then later on Chinese and just switch xml string file for a chinese menu but the String.xml can only use a unique name ID.

Is there any other way of doing this? In which I can create another string array and call it instantly like String.xml?

Any suggestions would be greatly appreciated, I am always willing to listen and get better if what I put down was no appropriate.

sdfwer
  • 1,042
  • 3
  • 10
  • 23
  • Do you want to 'switch' the language dynamically if the user selects a preference, for example? Or do you want the language to be automatically set depending on the user's device settings? – Squonk Mar 15 '12 at 18:01
  • Take a look at this question: http://stackoverflow.com/questions/5069008/multilanguage-app-best-way – MByD Mar 15 '12 at 18:03
  • If you put that on the answer I would have marked that correct. – sdfwer Mar 15 '12 at 18:27

2 Answers2

1

If I understand correctly you are looking for localization. Here is tutorial on how to implement this in Android.

kosa
  • 65,990
  • 13
  • 130
  • 167
0

Personally, I might make 2 (or more for more languages) apps that have the same function except for the fact that they are in different languages.

Kurty
  • 475
  • 2
  • 16