3

I'm testing a very simple site — it's a placeholder site mostly built on graphics — and when I just loaded it in Chrome, the Chrome toolbar tells me the pages is in Turkish and asks if I'd like to translate. I can't find anything in the code that could be causing this. I'm just going to put it all up here since there's not much of it. Below is the page code in its entirety, with brand names changed. (There's nothing in the brand names that indicates to me they'd be interpreted as Turkish).

<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <title>Acme Vineyards &#8472; Sonoma County</title>
        <meta name="description" content="Acme Vineyards: Farming with Purpose in Sonoma County, California">
        <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, width=device-width">
        <link rel="stylesheet" href="normalize.min.css">
        <link rel="stylesheet" href="main.css">
        <!--[if lt IE 9]>
            <script src="js/vendor/html5-3.6-respond-1.1.0.min.js"></script>
        <![endif]-->
    </head>
    <body>

        <nav>
            <ul><!-- before adding anchor tags, uncomment the :hover lines in main.less -->
                <li id="durell">Marnell Vineyard</li>
                <li id="gaps-crown">Gap&rsquo;s End Vineyard</li>
                <li id="dupont">Acme Vineyard</li>
                <li id="wilson">Smith Vineyard</li>
                <li id="one-sky">One Star Vineyard</li>
            </ul>
        </nav>
        <div class="main-container">
            <h1>Acme Vineyards: Farming with Purpose in Sonoma County</h1>
        </div>
        <div class="footer-container">
            <footer>
                <dl id="phone">
                    <dt class="office">Office: </dt><dd class="office"><a href="tel:5555555555">555-555-5555</a></dd>
                    <dt class="fax">Fax: </dt><dd class="fax"><a href="tel:5555555555">555-555-5555</a></dd>
                </dl>
                <ul id="mail">
                    <li id="email"><a href="mailto:info@acmevineyards.com">info@acmevineyards.com</a></li>
                    <li>PO Box 55555, Sonoma, CA 95555</li>
                </ul>
            </footer>
            <p id="credits">Site Design: <a href="http://acmedesign.com" target="_blank">Acme Design</a>
        </div>
        <div id="badge"></div>
    </body>
</html>  
Kerri
  • 1,211
  • 2
  • 15
  • 22

3 Answers3

3

Use <meta> tags to instruct chrome about the content and ignore translating

<meta charset="UTF-8" />
<meta name="google" content="notranslate">
<meta http-equiv="Content-Language" content="en" />
Mr. Alien
  • 153,751
  • 34
  • 298
  • 278
  • (same comment as above:) Isn't "content-language" depricated in HTML5? – Kerri Mar 21 '13 at 19:27
  • @Kerri it's what you are instructing the browser, which language you are using for the current page, I don't want to blindly fire a bullet saying it is deprecated or not, as am not sure, in fact in HTML5, you can define `lang` attribute to instruct browser that your element holds content written in which language – Mr. Alien Mar 21 '13 at 19:32
  • This worked adding the only — as I don't want to prevent google from translating, just translating in the wrong language. But I'm still not thrilled with this solution considering my comment above… ETA: As long as it works, I'm using it! Especially for a temporary site. And you can see from my original code, I did use the lang="en" attribute on , and it held no effect. I wonder why. – Kerri Mar 21 '13 at 19:35
  • @Kerri Ya I saw that, may be Google will work on the algorithms as html5 develops – Mr. Alien Mar 21 '13 at 19:39
  • While this "solves" the problem, we are still left to ponder *why*. – Brad M Mar 21 '13 at 19:42
  • @BradM Let Sergey Or Larry answer this – Mr. Alien Mar 21 '13 at 19:54
3

This question had luck with adding these meta properties to force Chrome to not attempt translation:

  <meta charset="UTF-8" />
  <meta name="google" content="notranslate">
  <meta http-equiv="Content-Language" content="en" />
Community
  • 1
  • 1
Igor
  • 33,276
  • 14
  • 79
  • 112
  • Isn't "content-language" depricated in HTML5? – Kerri Mar 21 '13 at 19:26
  • This worked adding the only — as I don't want to prevent google from translating, just translating in the wrong language. But I'm still not thrilled with this solution considering my comment above… – Kerri Mar 21 '13 at 19:33
2

Your issue is this &#8472;

Looks like a turkish character to me!

Brad M
  • 7,857
  • 1
  • 23
  • 40
  • 1
    I think this might be what's tripping translate ref: http://www.codetable.net/decimal/8472 – JerKimball Mar 21 '13 at 19:24
  • 1
    Hmmm… I thought that might be it, but just tried removing it, and Chrome still thought it was Turkish. Hypothetically speaking, though, could one foreign character in a document where all the other characters are standard english really throw the whole language? – Kerri Mar 21 '13 at 19:31
  • @Kerri That is actually a very good question worthy of its own post. – Brad M Mar 21 '13 at 19:35