I have been banging my head against the wall for 2 days trying add language-specific localization to my app. The App is using PhoneGap 1.1 and I am trying to build it up using XCode 4.1
I have been searching for infos/tutorial/whatever since 2 days now but I could not find anything detailed. So, either it's a trivial issue and I am failing at understing it, or it's an uncommon issue.
Many threads I've seen explain that I have to create a new folder under "Resources" and add the following folders to the project (say I want my app to be localized in French and for non-French speaking countries):
--locales
--- en
---- local.strings
--- fr
---- local.strings
I am already in troubles now: first of all, what should I consider as my project root folder? All my code is inside the "www" folder and as far as I understood, this is the main node PG looks at when doing its job. So I assume I have to create "locales" under "www".
Assuming this is the correct place, I have to enter the key-value pairs into the .strings file. Now, how do I tell Xcode which strings it needs to look at in my index.html page?
In Objective-C this is done by calling NSLocalizedString(@"StringKey")
, but since I am using PG I have either plain HTML or JS to use. Is there any built-in method to do so?
Is this the wrong approach? Any hint, tutorial, documentation, reference guide on the subject would be of great help.