Categories
HTML

How to tell Google Translate to not translate a section of a website?

Spread the love

Sometimes, we want to tell Google Translate to not translate a section of a website.

In this article, we’ll look at how to tell Google Translate to not translate a section of a website.

How to tell Google Translate to not translate a section of a website?

To tell Google Translate to not translate a section of a website, we can add the notranslate class to the elements with text that we don’t want to translate.

For instance, we write

Welcome to the <span class="notranslate">cool</span> company website!

to not translate ‘cool’ in the span by adding the notranslate class to the span.

Conclusion

To tell Google Translate to not translate a section of a website, we can add the notranslate class to the elements with text that we don’t want to translate.

By John Au-Yeung

Web developer specializing in React, Vue, and front end development.

Leave a Reply

Your email address will not be published. Required fields are marked *