WordPress - Edition - How to exclude URLs/blocks/words from translation?

In this article, you'll find how to exclude a specific URL/block/paragraph from being translated in your WordPress website.

1. Exclude URLs

On WordPress, you have the possibility to exclude some pages from translation. That means those pages won't be translated at all and the button will not appear on them.

You can do it directly from your WordPress Dashboard >  Weglot  plugin > Translation Exclusion section, then click on "Add an URL to exclude"

If the URL you would like to exclude is https://www.mywebsite.com/my-page-1, add /my-page-1 to the text field.

If you want to exclude more URLs, click "Add an URL to exclude", and repeat the steps.

The last thing to do is to save changes, and you're good to go!

2. Exclude blocks

If you want to exclude a specific part of your website like the header for example, go to your WordPress Dashboard > Weglot plugin > Translation Exclusion section. There, you can paste the right CSS selector (CLASS or ID) of the block.

You can find the CSS selector by right-clicking on the block > Inspect Element.

In this example, you have the choice to exclude either the ID (menu-menu-1) or the CLASS (nav or navbar-nav). No matter the name of the selector, if it's an ID, you must add a sharp "#" before and if it's a CLASS, you must add a dot "." before.

On your WordPress Dashboard >  Weglot  plugin > Translation Exclusion section, then click on "Add a block to exclude"

Then, add the class or id of the element in the text field.

You can add as many classes and id as you want by clicking "Add a block to exclude" and repeating the steps.

Click on "Save changes". Then, the navigation bar won't be translated whatever the language is.

3. Translations Tools

Go to your Weglot account > Translation Tools:

a. Translation Exceptions:

In this section you can indicate if you want a word/expression to be never translated or translated in a custom way. The rules will be applied on all new translations but won't change the existing translations.

b. Search and Replace rules:

In this section you can search for a word in all translations and replace it. It is useful if a name has been mistranslated and you want to change it everywhere

Still need help? Contact Us Contact Us