Did you try html?
- How do I tell Google Translate API to NOT translate something?
- You can use the following HTML tag
<span class="e;notranslate"e;> </span>. Note that this functionality requires the source text to be submitted in HTML.
Sounds like it could be the right track, but could you elaborate?
Here's the basic pattern I'm using thus far:
1) Insert from URL
& “?key=" & $apiKey
& "&source=" & $inputLanguageAbbreviation & "&target=" & $outputLanguageAbbreviation
& "&q=" & Substitute ( $phrase ; " " ; "%20" )
2 ) Parse the result
Check for errors
So, if $phrase = "Do you want to send Destiny an email?"...
Am I using the wrong bit of the api for this? Or do you see how I could insert appropriate html into this existing method?
I hate to be dense, I just can't seem to find a way forward. This basic pattern worked well right away, so I ran with it. Now, when I've tried to tinker with it to use the "notranslate" tag, I manage to just make it not work at all. I've read the documentation and a ton of blogs and forums and such, but it's as though there are developers just translating phrases, and there are developers translating web pages on the fly, and the two groups don't seem to speak the same language (if you will).
I'm probably just missing one or two things that should be obvious to me, but the problem is that I don't know what they are, so I may need a rundown of many "obvious" things before I see the ones I'm missing.
Thanks in advance for your patience.
I didn't tested, but reading https://cloud.google.com/translate/v2/using_rest#query-params
it would be
$phrase = "Do you want to send
<span class="e;notranslate"e;>Destiny</span> an email?".
& "&q=" & GetAsURLEncoded ( $phrase )
You don't use format parameter in this URL, then it is already html as default value, if there is no html tag in the phrase.
Possibly inserted <span> tag will remain in the translated result.