I played around with Google’s translator a little after adding some notranslate
directives as discussed in my previous post. Google did honor my requests to mark some sections as literal text to not be translated. Google’s translator was also able to recognize my name as a name without special markup. Yahoo, on the other hand, translated my name, turning “Cook” into “Cuisinier” in French.
Google treated text inside <code>
tags as literals that should not be translated. That is, Google would leave my source code snippets alone and only translate the English prose surrounding the code. Yahoo, on the other hand, would translate everything, including source code. For example, I had some PowerShell code on my page with the keyword matches
that Google left alone but Yahoo translated into “allumettes,” presumably good French prose but not a legal PowerShell keyword.
One puzzling thing about the Google translation engine was that it would change which text was hyperlinked. For example, the text “My résumé” was changed to “Mon CV,” linking on the translation for “my.” Yahoo produced what I expected, “Mon résumé.” There were several other instances in which Google produced odd links, such as hyperlinking the | marker between words that were linked before. For example, the footer of my website has these links:
Home | Sitemap | My blog | Search
Yahoo turned this into
Maison | Sitemap | Mon blog | Recherche
while Google produced
Accueil | Plan du site | Mon blog | Recherche
So Google incorporated the separator bars as part of words, and moved the last link from “Recherche” to the bar separating “blog” and “Rescherche.”
One advantage of Google’s translation is that it lets you hover your mouse over a line of translated text and see the original text.