MindTouch Developer Center > Deki > FAQ > Page Management > How do I...Embed a language translater in my page?

How do I...Embed a language translater in my page?

Table of contents
No headers

To create a simple template that will translate your page to any language using Google Translate:

  1. Create a page named Template:Translate
  2. Toggle to HTML Source and insert the following:
    <div style="float: right;">
      <script src="{{'http://www.gmodules.com/ig/ifr?url=http://www.google.com/ig/modules/translatemypage.xml&up_source_language=' .. string.split(page.language !== '' ? page.language : site.language, '-', 2)[0] .. '&w=160&h=60&title=&border=&output=js'}}">
      </script>
    </div>
  3. Save the template.
  4. Insert the following code on the page in which you wish the Google Translate control box to appear (the control box will automatically align right per the template):
  5. {{ wiki.template("Translate") }}
  6. Demo: 
Tag page
You must login to post a comment.
Powered by MindTouch Deki v.8.08.2