Hi there,
I would like to exclude 1 part of my website being translated.
And the translation-plugin-provider gives me this tutorial on how to do it, but i am not an expert, so I cannot figure it out.
They explain about class, so I tried to put “notranslate” into the class-field in cornerstone. But it still translates it. Do I have to create the class first somehow?
Thank you.
How to skip translations?
Edvard avatar
Written by Edvard
Updated over a week ago
- Skip translation using “notranslate” class
Note: This method works both for free and paid versions of GTranslate, whereas other methods described below are available only for our paid versions.
In order to prevent the translation of certain parts of your website, you can use class=“notranslate” attribute for any HTML element.
For example:
<span class="notranslate">this text will not be translated</span>
Another example for page content:
<div class="notranslate">
<p>This paragraph will not be translated</p>
<div>The content of this block will not be translated</div>
</div>
- Skip translation using CSS selector
You can add multiple CSS selectors in your User Dashboard Settings page, which will ensure that the HTML elements which match your selectors will be skipped from translation. Compared to the previous method, this method doesn’t require modifications on your website content. For example:
<h2 id="product_title">John Doe's Pizza</h2>
For this case you can use the following CSS selector:
#product_title
To skip the title of the page form translation you can define it with this selector:
title