Translate DeveloperHub.io Docs

This DeveloperHub.io Docs integration guide shows you how to translate DeveloperHub.io Docs in a few easy steps. Follow this tutorial to create multilingual DeveloperHub.io Docs translated to other languages for your international customers.

Below is a step by step guide for integrating Localize into your DeveloperHub.io Docs repository.

If you do not have a Localize Project yet, signup here!

1. Insert the Localize Code Snippet

Navigate in your DeveloperHub admin area to the Custom HEAD Tags section.

Copy-and-paste the following Localize Code Snippet into the panel.

<script>
  (function(d, script) {
      script = d.createElement('script');
      script.type = 'text/javascript';
      script.async = true;
      script.onload = function(){
          !function(a){if(!a.Localize){a.Localize={};for(var e=["translate","untranslate","phrase","initialize","translatePage","setLanguage","getLanguage","detectLanguage","getAvailableLanguages","untranslatePage","bootstrap","prefetch","on","off","hideWidget","showWidget","getSourceLanguage"],t=0;t<e.length;t++)a.Localize[e[t]]=function(){}}}(window);

          Localize.initialize({
            key: '[[app:key]]',
            rememberLanguage: true,
            saveNewPhrasesFromSource: true
            // other options go here, separated by commas
          });
      };
      script.src = 'https://global.localizecdn.com/localize.js';
      d.getElementsByTagName('head')[0].appendChild(script);
  }(document));
</script>

2. Add Initialization Options

Add any desired options to the Localize.initialize() call above, check here for the full list of possible options.

As seen in the code snippet above, we recommend adding the following options:

  • rememberLanguage: true
  • saveNewPhrasesFromSource: true

Some other popular options include:

  • autoApprove - use to fully automate your translation workflow
  • localizeImages - allows for localization of images in your site

3. Load your application in a browser.

  1. Visit your website in a browser.
  2. Select one of your target languages using the language switching widget.
  3. Refresh the page.
  4. Lather, rinse, repeat, for each page in your site.

Localize will automatically begin to detect new content on the pages that you visit, and will bring it into your dashboard.

4. Approve phrases

Then head on over to the Manage Phrases page to approve phrases in the Localize dashboard.

5. Phrases not showing up?

If you are not seeing phrases show up in your Pending bin in the Localize dashboard, follow the troubleshooting instructions here.


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


Did this page help you?