Phonegap

Easily create Localized mobile apps with HTML, CSS, and JavaScript.

Translate your Phonegap application with Localize

Below is a step by step guide for integrating Localize into your phonegap application.

If you do not have a project yet, signup here!

1) Go to the Localize dashboard to copy the Localize javascript library code.

Insert the code between your phonegap app's 'index.html' file <head> </hea> tags:

<head>
<script src="https://global.localizecdn.com/localize.js"></script>
<script>!function(a){if(!a.Localize){a.Localize={};for(var e=["translate","untranslate","phrase","initialize","translatePage","setLanguage","getLanguage","detectLanguage","getAvailableLanguages","untranslatePage","bootstrap","prefetch","on","off"],t=0;t<e.length;t++)a.Localize[e[t]]=function(){}}}(window);</script>
<script>
  Localize.initialize({
    key: '[[app:key]]', 
    rememberLanguage: true
  });
</script>
</head>

2) Load the phone gap application.

If you are using the Mac App, enter the port server into your phone browser.

3) If you want to debug your code.

Make sure to allow debugging on your iphone by following this tutorial.

4) When Localize loads properly you should see our language widget.

If you want to turn off the language widget and use link selectors, click here and turn off the language widget.

Here's an FAQ link on how to do that.

5) Go to the Localize Phrases Dashboard and approve your pending phrases.

6) Once your phrases have been approved. Reload your phonegap application

Use our Langauge Widget Selector to test different languages to make sure translations are loading.

Tip: Make sure to order business quality human translations. Or have someone QA the translations for you.

Your app should be translating into different languages now!

Congrats, you're done!

FYI, here's a test app on github.

Want to learn more about our Mobile SDK developments? Sign up here.


Need Help? Contact us for custom integration help or troubleshooting!