-
1. Re: Google Translation
sudarshan.t Apr 28, 2012 2:59 AM (in response to manojb05)You have two ways of doing this:
- Add a class="notranslate" to the HTML element you dont want to translate
- Visit http://translate.google.com/translate_tools and choose Add translation to a section of the webpage to translate only one section of the page. This will create sectional and control node classes that you could use on specific areas of your site that you want to translate
-
2. Re: Google Translation
manojb05 Apr 28, 2012 3:15 AM (in response to sudarshan.t)thanks for your prompt reply.
1) How can i make a notranslate class
2) I think second method google translation come on top and mouse over translation window also come (clients dont want that style)
-
3. Re: Google Translation
sudarshan.t Apr 28, 2012 4:48 AM (in response to manojb05)Line 27 of your HTML file
<td class="notranslate" height="28"><select onChange="doTranslate(this);"><option selected="selected" value="">Select Language</option><option style="font-weight: bold;" value="en|en">English</option><option value="en|ar">Arabic</option><option value="en|nl">Dutch</option><option value="en|fr">French</option><option value="en|de">German</option><option value="en|el">Greek</option><option value="en|iw">Hebrew</option><option value="en|hi">Hindi</option><option value="en|it">Italian</option><option value="en|ja">Japanese</option><option value="en|ko">Korean</option><option value="en|fa">Persian</option><option value="en|pl">Polish</option><option value="en|pt">Portuguese</option><option value="en|ru">Russian</option><option value="en|sl">Slovenian</option><option value="en|es">Spanish</option></select></td>
-
4. Re: Google Translation
manojb05 Apr 28, 2012 5:27 AM (in response to manojb05)thanks you so much, its working.
what is the working principle of class="notranslate" i dont get it now.
-
5. Re: Google Translation
sudarshan.t Apr 28, 2012 5:47 AM (in response to manojb05)Google's API function is as follows:
function doTranslate(lang_pair) {if(lang_pair.value)lang_pair=lang_pair.value;if(location.hostname=='www.newtonclients.co m' && lang_pair=='en|en')return;else if(location.hostname!='www.newtonclients.com' && lang_pair=='en|en')openTab(unescape(gfg('u')));else if(location.hostname=='www.newtonclients.com' && lang_pair!='en|en')openTab('http://translate.google.com/translate?client=tmpg&hl=en&langpair='+lang_pair+'&u='+escape( location.href));else openTab('http://translate.google.com/translate?client=tmpg&hl=en&langpair='+lang_pair+'&u='+unescap e(gfg('u')));}
Note the bold function name. This is included by default in all the elements of your page when you insert the Google Translate code and request Google to translate your document for you.
class="notranslate" works as an override to this function, meaning, whichever element you have class="notranslate" on, Google will skip those tags and all child tags within them. This is controlled by Google API when it reads your page during the translation request.
Trust this helps.
-
-
7. Re: Google Translation
sudarshan.t Apr 28, 2012 8:02 AM (in response to manojb05)You're welcome.