Welcome to WebmasterWorld Guest from 54.196.233.239

Message Too Old, No Replies

Google adds "notranslate" option for parts of page

     

amznVibe

2:56 pm on Oct 21, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Google has finally done something I was hoping they'd years ago.

If you wrap some text on your page with a class of "notranslate" you can force their translation engine to skip it and display it literally:

[googlewebmastercentral.blogspot.com...]

ie.

<span class="notranslate">Trademark</span>

You can also do it for an entire page by using "notranslate" in the meta but that would be unusual.

Let's see if other translation engines follow.

ps. What ever happened to Google's project to use United Nations documents to improve the translation engine? Did they follow through or not?

tedster

6:52 pm on Oct 21, 2008 (gmt 0)

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Yes, it's a good gesture. I wonder about the choice of syntax however. I guess we have to assume that they checked their data and picked a class name that is not already used by many webmasters. I think I would have preferred a comment tag syntax rather than a span-plus-class.

Samizdata

7:41 pm on Oct 21, 2008 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member



I have no problem with the meta tag specific to the company:

<meta name="google" value="notranslate">

But appropriating class names sets a very bad precedent.

I wonder what other classes Google, Yahoo, Microsoft etc will reserve for themselves.

...

Robert Charlton

8:02 am on Oct 22, 2008 (gmt 0)

WebmasterWorld Administrator robert_charlton is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



I just wonder whether there's a reason they picked class. Perhaps they're looking at class values anyway in the course of returning a translation, so this setup would involve less computation.

As I remember, they preserve text and page formatting on translated pages.

martinibuster

9:23 am on Oct 24, 2008 (gmt 0)

WebmasterWorld Administrator martinibuster is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



>>>Perhaps they're looking at class values anyway...

Makes you wonder what else they're doing with CSS files. Time to rename class="bold" to class="xyz"? ;)

Maybe using comment tags to mark content blocks (as with the AdSense program) would be more appropriate so as to stay closer within web standards.

g1smd

3:04 pm on Oct 24, 2008 (gmt 0)

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



Here's a case where invalid markup could affect the outcome of what you wanted to do.

There will be an end tag for the

notranslate
block but are you sure which one in your code it actually is?
 

Featured Threads

Hot Threads This Week

Hot Threads This Month