Currently I know that <span class="e;notranslate"e;> </span>
is used to omit out text to translate between the span.
I am looking out for sending content with HTML tag to Translate API and let it return without translating the tags. Is there anyway that tags could be omitted out before translating and putting them back when the JSON returns with the translated text or is there any syntax to exclude Translate API from translating the HTML tags?
Doing some research before I decide to whether code in JS or Java.
Read this before : Temporary removal of HTML from string for Google Translate API to reduce cost
However, if you don't want a section of your webpage to be translated, just add "class=notranslate" to any HTML element to prevent that element from being translated.
Put a minus sign before words you want to exclude from your search results.
Google have a optional parameter format
.
•This optional parameter allows you to indicate that the text to be translated is either plain-text or HTML. A value of "html" indicates HTML and a value of "text" indicates plain-text.
•Default: format=html.
https://cloud.google.com/translate/v2/using_rest
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With