Exclude a part of website from being translated

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

  1. 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>
  1. 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

Hi Maik,

Thanks for reaching out.

Cornerstone use manual translation and it’s not the same as string translation where WPML have direct control. Manual translation just switches the page into its corresponding language and there, it shows what you just translated manually. Hence, the solution is just not translating that specific part or an element. Or if it’s already translated, then translate it back to its original text and that should appear as not translated since it’s the same as before.

Thanks!

Hi Rad,
Thanks for your answer.

I think you completely misunderstood my issue.
I use gtranslate which auto translates whole pages when i use the language picker on my site.
Now there is a part of my website which i dont’t want to be translated, because there is a datepicker inside, and that datepicker must’not be translated, otherwise it does’t work anymore.
Now I would like to know, how can I exclude either only my plugin (inserted by shortcode on a page) or exclude the whole page /booking/ from being translated.
Nothing about manual translation
and nothing about WPML.

Please see the link in the “hidden field”

Hello @Maik,

I have checked the page and you seem to have inserted the custom class incorrectly.
You have inserted "notranslate". Please remove the quotes and only insert notranslate in the class field.

Hope this helps. Please let us know how it goes.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.