• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Adding A Translate Button To Your SiteWide Template

Mentor ,
Mar 15, 2012 Mar 15, 2012

Copy link to clipboard

Copied

Introduction

Adding a "Translate" button to your website is a great way to cater to the global online audience.

Using the handy TranslateThis service, you can add a button to your site-wide template in just seconds - enabling visitors to translate your pages into over 50 different languages.

Note: In this article, we'll be adding the button to our site-wide template, however if you'd like to limit the pages the button is rendered on, you can simply include the code in the desired module layout (eg. your Blog Post Details layout).

Step 1 - Select Template


Navigate to Admin > Manage Site-Wide Templates and select the template you'd like to add the translate button to. For this example, we'll just choose our default "Main Template".

Step 2 - Insert HTML / Javascript


Switch over to the HTML mode of the online editor and insert the following code where you'd like the button rendered:

<!-- Begin TranslateThis Button -->

<div id="translate-this"><a href="http://translateth.is/" class="translate-this-button">Translate</a></div>

<script type="text/javascript" src="http://www.google.com/jsapi"></script>

<script type="text/javascript" src="http://x.translateth.is/translate-this.js"></script>

<script type="text/javascript">

TranslateThis();

</script>

<!-- End TranslateThis Button -->

Step 3 - Save and Publish

Click "Save and Publish" to save your changes.

Switching over to the front end of your site, you should now see the "Translate" button rendered on all of your pages that use the template we just edited.

translate-button.PNG

Naturally, you can customize the look and feel of the button using CSS / JavaScript. For more details on advanced customization options, refer to the TranslateThis documentation page at: http://translateth.is/docs

TOPICS
Documentation

Views

1.3K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 23, 2014 Apr 23, 2014

Copy link to clipboard

Copied

LATEST

Yeah it would be very helful . so I switch the translated language to a language other than easily I usuqaly pass my mouse over a word it translates the word in Spanish. Visit h2ere for more help :http://www.translationservicesworld.com/

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines