invitation india
UnexpectedWeb
Connect

Popular Technology Blog where you'll find some interesting things around the web, that you never knew existed.

link Link copied

Prevent Google translate from translating some words

Share on: link Link copied

You can disable Google Translate on the website, or parts of the website. Sometimes Google Search provides translated results, which help users to access information available in another language, and websites and blogs to reach a wider audience. You can read this article to get more information about translated results showing in Google search.

Let's learn how to prevent some content from being translated automatically on a website. 

If you want to translate whole page except some text or html element, You can tell to Google Search "please do not translate certain parts of the website"

Learn how to convert your website/blog into a multi language website.


1. By adding class class="notranslate"
<div>
    Not translate word
    <span class="notranslate">
        Google Search
    </span>
    on my website.
</div>
output:
Not translate word Google Search on my website.


2. By adding attribute translate="no"
<div>
    Not translate word
    <span translate="no">
        Google Search
    </span>
    on my website.
</div>
output:
Not translate word Google Search on my website.

The above approach will be suitable when we have limited content or element which we don't want to translate but what will you do if the situation is opposite. 

If you want only few content or certain sections of the website to be translated, Or a large part of the website should not be translated but some text inside it should be translated.

Allow translate, inside 'notranslate' class element.

Aadding attribute translate="yes"  inside class="notranslate"

<div class="notranslate">
    Not translate word
    <span translate="yes">
        Google Search
    </span>
    on my website.
</div>
output:
Not translate word Google Search on my website.


No comments:

Powered by Blogger.