BigCommerce - 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 on your BigCommerce website.

1. Exclude URL : 

Weglot translates all your website content by default.

You can exclude some pages from the translation process. Doing this, those pages will not be translated at all and the Weglot language switcher will not be displayed on them.

To do this, first, you'll need to find the relative URL of the pages you would like to exclude. For example, if your page is  www.mywebsite.com/page1/, then only add its relative URL: /page1/

Once you have found that relative URL, you'll need to paste in the 'Excluded URLs' section in your Project Settings:

Then you'll need to click on the '+' sign button to add the exclusion:

You can also select the exclusion type you are looking to apply:

  • Start with: This option will exclude all the pages that have their slug starting with the input
  • End with: It will exclude all the pages that have their slug ending with the input
  • Contain: It will exclude all the pages that have their slug containing the input
  • Is exactly: It will exclude the page that has it slug identical to the input
  • Match regex: It will exclude the page matching the regex input

Note that Weglot doesn't automatically remove the translations related to the excluded pages. Once the pages are excluded, you'll need to manually delete the translations related to these pages. See: How to definitely remove a translation?


2. Exclude blocks :

Using Weglot, you can also exclude specific parts of your website like the header or your product's titles, for example, with the CSS selectors of these parts.

You can find the CSS selector, using your browser's inspector by right-clicking on the block then select 'Inspect Element' : 

Here is an example of the inspector view on a browser: 

In this example, you have the choice to exclude either the id (cc-nav-view-2649987296) or the class ( jmd -nav__list-item-0) to actually exclude the content in the list element (the link 'nieuws'). No matter the name of the selector, if it's an id, you must add a sharp symbol '#' before and if it's a class, you must add a dot '.' right before the class, such as:

#css-id, .css-class

Once you have found the right CSS selector, you'll need to paste it in the 'Excluded Blocks' section in your Project Settings:

Then you'll need to click on the '+' sign button to add the exclusion:

Note that Weglot doesn't automatically remove the translations related to the excluded blocks. Once the blocks are excluded, you'll need to manually delete the translations related to these blocks. See: How to definitely remove a translation?

Still need help? Contact Us Contact Us