Is it possible to set the translation a browser might use for various bits of a web page?
For instance, the page is all in English and the label of a button might be “Submit” and the user might want to translate that page in Spanish using the built-in browser translator. How do I force the browser to keep the button’s label in English while translating the rest of the page in Spanish?
2
Answers
It is not possible to prevent the translation of individual elements. When user will translate page using browser it will translate the whole page and we there is now way to avoid translation of a perticular element or in your case button.
Edit: Alternatively you can use an image as the button instead of text. By using an image, text in the image will not be translated by browser
Here is code to explain what I am trying to say
Try running this in your browser.
Don’t take this answer too seriously, but you might be able to break your text into pieces that cannot be translated on its own. No guarantees that this will work though:
Additionally, this might break all other kinds of behavior/functionality of your browser or screen readers. If visitors want to have your site translated, let them.