Search code examples
cordovamultiple-languages

Multiple Languages for Phonegap Application


Does anyone have experience to build phonegap app that support multiple languages (english, french, german etc...) ? I'm looking a way to change ui of my app most efficent with javascript. It would be helpful when you can show me any existing javascript libs that can help me to do this.

Thanks

Edited:

i edited the question so that it's more understandable.


Solution

  • Assuming you are talking about spoken languages here, you just need to replace all your hard coded strings in your HTML such that they they are inserted during a templating phase and looked up in a table of string values, which table to string values that is used can be determined by what language the application is operating in. There was a good article on this topic on 24ways a while back, check it out here. The article is for JavaScript so it certainly applies for a PhoneGap application.