Skip to main content

Not translating pages or parts of them

Sometimes you have parts of your website that you would rather not translate. For example, consider quotes, article names or other fragments of text that should remain untranslated. Also, you may not want to translate entire pages because you do not consider them important and thus want to save costs on additional character bundles.

caution

All of the following actions should be taken on your original website. If you try to apply the changes to the clone with substitution rules, for example, it will not work.

Excluding entire pages

If you want to exclude whole pages you can add the meta tag below to your original website. The whole page will then not be translated. Preferably place the meta tag between the <head> </head> tags of your website, but if this is not possible you can also place it somewhere else.

<head>
...
<meta clonable-translate="no">
...
</head>

Excluding individual elements

In addition to excluding an entire page, you can also exclude blocks. This gives you more flexibility about what should and should not be translated. This way it is possible, for example, to exclude only the content on a page from being translated while your header and footer remain translated. But also small elements such as individual pieces of text can be excluded from translation this way. To work best with as many systems as possible, Clonable offers two options to exclude elements.

Option 1: exclude using a CSS class

The first and often easiest option is to add a CSS class to the element you want to exclude. To exclude an element, add the class notranslate to that element.

<div>
<div class="notranslate">
<h2>Non-translatable title</h2>
<p>Non-translatable text</p>
</div>
<p>Translatable text</p>
</div>

Option 2: exclude using an HTML attribute

The second option to exclude an element from translation is through the translate="no" attribute. Adding this attribute to an element will prevent it from being translated.

<div>
<div translate="no">
<h2>Non-translatable title</h2>
<p>Non-translatable text</p>
</div>
<p>Translatable text</p>
</div>
info

When you exclude an element, all underlying elements (also called child elements) are also excluded from translation.:::