My android app has a drop down List,From where user can change language like English, Javanese so on. when user change language then app language will be change. It is a simple app where has only one layout.Please any one help me
-
Do you have different `String.xml`'s for different languages? And 25% accept ration is waaaay too low man! – iTurki Aug 30 '12 at 11:04
-
yes man my app has three folders. like values-en,values-jp,values-fr – Helal Khan Aug 30 '12 at 11:17
-
follow this solution: http://stackoverflow.com/a/4239680/543711 – iTurki Aug 30 '12 at 11:25
1 Answers
I wouldn't trust on-the-fly translation of your strings; even the best automatic translators can produce inaccurate output. Additionally, you add a fair amount of complexity, overhead, and dependency (e.g., having a network connection) by handling translation this way.
The problem of having a "multilangauge app" (as you called it) is well-known, and the process of solving it is called internationalization and localization . In general, when you're working with a framework or programming language, you can look for existing packages/libraries relating to this topic -- it's almost a given that others have spent significant time building a good mechanism(s) to facilitate this.
Android is no exception; it's been developed with localization support built-in. The Android Developer Documentation has a comprehensive guideon Localization that you should take a look at. You'll still need to translate your text somehow, but a lot of the "groundwork" of how you can serve up locale-specific messages to the user has already been laid out for you.
One last note -- the Android docs also provide a tutorial called " Hello, L10n", which walks you through the basics of creating a localized app. Hope this helps!

- 9,477
- 12
- 61
- 113