A free way to offer other languages (albeit via GoogleTranslate)

If youre site receives visits from other countries then a free way to offer a huge variety of languages is the following (albeit via the not failsafe Google Translate system). Adding a few lines of code from Google to create a discreet Translate button in the top right (for example) of your website is easily done by clicking here. You'll only need to add the code they give to the head of your /templates/base/_header.html file. It saves the need for a new language file and the fact that the Dolphin language selector icon isn't exactly highly visible. Just another option for you :)

Quote · 30 Jan 2011

Hi, trying to do what you say, I past the code from google translate in to /templates/base/_header.html  , I can seegoogle translate  on home page, but page looks like this, would be good to get this working, very helpfull solution.

Thanks helping out,

_header.html


_header.png · 38K · 404 views
Quote · 17 Feb 2011

 

 

I added the code below to my quotes module : /modules/boonex/quotes/templates/base/unit.html   ......right before the last </div>

it allows all things in my site to be translated in 52 languages.  I'm still working on my site but you can see how it works at:

http://www.happyecho.com/community/

(if this helps you maybe you can help me I want to create new modules like blogs - a gratitude journal w/ all the features of blogs but separate)

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------code below

<!-- 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 -->

Quote · 26 Feb 2011

Did you clear your cache after you put the code in?

Hi, trying to do what you say, I past the code from google translate in to /templates/base/_header.html  , I can seegoogle translate  on home page, but page looks like this, would be good to get this working, very helpfull solution.

Thanks helping out,

_header.html


 

What's that falling? its a bird, its a plane, oh wait its Facebook
Quote · 27 Feb 2011

Doesn't work for me.

 

 

 

 

 

I added the code below to my quotes module : /modules/boonex/quotes/templates/base/unit.html   ......right before the last </div>

it allows all things in my site to be translated in 52 languages.  I'm still working on my site but you can see how it works at:

http://www.happyecho.com/community/

(if this helps you maybe you can help me I want to create new modules like blogs - a gratitude journal w/ all the features of blogs but separate)

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------code below

<!-- 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 -->

 

What's that falling? its a bird, its a plane, oh wait its Facebook
Quote · 27 Feb 2011

I don't use quotes on my site so mine is missing the line (in:modules/boonex/quotes/templates/base/unit.html):

"__unit_text__"

 

 

But I did use it at first with quotes and it worked it just showed it below the quotes.  I like this one because it will keep translating even when you go to a new page.  To stop it all you do is click cancel or undo.  This is how it looks in my: modules/boonex/quotes/templates/base/unit.html

Note: (there is no spacing and I don't use quotes)

 

 

 

 

 

<div class="quote_div">

<div class="daily_quotes">

<i></i><br />

<p class="author">__author__</p>

</div>

<div class="clear_both"></div>

<!-- 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 -->

</div>

 

 

Doesn't work for me.

 

 

 

 

 

I added the code below to my quotes module : /modules/boonex/quotes/templates/base/unit.html   ......right before the last </div>

it allows all things in my site to be translated in 52 languages.  I'm still working on my site but you can see how it works at:

http://www.happyecho.com/community/

(if this helps you maybe you can help me I want to create new modules like blogs - a gratitude journal w/ all the features of blogs but separate)

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------code below

<!-- 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 -->

Quote · 27 Feb 2011

@ddesiree2003 - Went to your site and for some reason your translate button doesn't show up in Internet Explorer. (Works nice in Firefox and Chrome.)  If you find a way to get it to work in IE, please post it, since your code avoids the messy mouseover bubble.

I have tested a simple way to add a slightly different Google translate button to a Dolphin site:

1-Go to http://translate.google.com/translate_tools

2-Choose "Add translation to entire webpage," and your site language.

3-Expand the optional settings, choose all or specific languages, and display mode "Tabbed."  You then have the option as to location.  Due to bottom member menu, upper left or upper right work best.  Finally, choose your Advanced options.

4-Copy the code generated according to your choices and paste it into your site.  I added mine to an existing bottom banner, but you can also try your /templates/base/_header.html

Depending on your location choice, the Google translate button will appear on every page of your site in that location.  Make sure that there is nothing in your site that would be covered by it.  The only limitation I found in my case is the magnification at which the site can be viewed, as my nav bar is at the top and extreme magnification will cause links to disappear under the button.  But the end result is slick and highly functional.  You will find that translate works differently in different browsers - in some the translation has to be reapplied for each page you visit, in others it happens automatically.

The tip for me was to choose the "Tabbed" display mode.  It acts invisibly without changing your site layout or interfering with Google ads.  Inline mode is very tricky to set up, and doesn't even seem to work in an HTML block (code gets stripped).  In other places, like the header, it messes with the site layout.

 

Someday, Someway.
Quote · 27 Feb 2011

in my internet explorer it works - but I have version 9 installed.  I attached a pic.  You can download the latest version here:  http://www.microsoft.com/windows/internet-explorer/default.aspx

Explorer9.PNG · 451.6K · 407 views
Quote · 27 Feb 2011

Wow, Great works just like you said. Great information and help..

 

Thanks

Quote · 27 Feb 2011

You're welcome... Wink

Quote · 27 Feb 2011

Thanks for sharing ddesiree2003.  Works PERFECT on my site....WOW!

 

Jeff

Quote · 6 Mar 2011

Works fine, thanks for the good advice.  Finally, I used this code, works better for me, seems to translate faster, did not work for me in the first place, I forgot to install Quotes.

/modules/boonex/quotes/templates/base/unit.html

<div class="quote_div">
<div class="daily_quotes"><em></em><br />
<p class="author">__author__</p></div>
<div class="clear_both"></div>

<div id="google_translate_element"></div><script>
function googleTranslateElementInit() {
new google.translate.TranslateElement({
pageLanguage: 'en',
multilanguagePage: true,
layout: google.translate.TranslateElement.InlineLayout.SIMPLE
}, 'google_translate_element');
}
</script><script src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>

</div>

Quote · 8 Mar 2011

Thank you this works perfect for me after I add the code in the banner section.

What's that falling? its a bird, its a plane, oh wait its Facebook
Quote · 3 Apr 2011
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.