HTML head/meta: how to indicate the URL of a translated version ofthe page

Discussion in 'HTML' started by robert, Oct 17, 2010.

  1. robert

    robert Guest

    Hello, is there a standard for how to point to translated versions
    of file.

    e.g. on a english HTML with
    <meta name="language" content="en">

    to add something like

    <meta/link...
    RELATED_UNKOWNATTRIBUTES lang="fr" href='index-fr.html' >

    ....


    ?


    And which of the following alternatives is best/mandatory ... for
    search engines, browsers etc to tell the language of the current page?


    <meta http-equiv="content-language" content="fr">
    <meta name="language" content="fr">
    <meta http-equiv="language" content="fr">



    robert
    robert, Oct 17, 2010
    #1
    1. Advertising

  2. Re: HTML head/meta: how to indicate the URL of a translated version of the page

    robert wrote:

    > Hello, is there a standard for how to point to translated versions
    > of file.


    No. The best way is to include, in a fairly prominent manner, a link like

    French version ~ Version française:
    <a href="index-fr.html" hreflang="fr" lang="fr">La vie, l&rsquo;univers et
    tout ce qui es</a>

    > e.g. on a english HTML with
    > <meta name="language" content="en">


    The standard way - to the extent that there are any standards on HTML - to
    indicate the language of the page itself is to use the lang attribute on the
    <html> tag, e.g.
    <html lang="en">

    > to add something like
    >
    > <meta/link...
    > RELATED_UNKOWNATTRIBUTES lang="fr" href='index-fr.html' >


    Umm... you _can_ write
    <link rel="alternate" hreflang="fr" href='index-fr.html'
    and it does no harm, but do you expect browsers or other software to support
    it? Few browsers have made any strong attempts in that direction. As such,
    the element creates nothing visible to the user.

    > And which of the following alternatives is best/mandatory ... for
    > search engines, browsers etc to tell the language of the current page?


    They probably don't care about any of them, or about the lang attribute
    either. One reason to this is that page editing software is known to spit
    out such incantations without caring the least about the language actually
    used and without informing the author. Search engines can typically figure
    out the language from the content itself - typically, a few dozen words
    suffice to distinguish between major languages.

    Browsers don't normally care about the language at all. To the extent they
    do - such as glyph selection for Chinese-Japanese-Korean characters that
    should partly take different shapes depending on language - they use the
    lang attribute.

    --
    Yucca, http://www.cs.tut.fi/~jkorpela/
    Jukka K. Korpela, Oct 17, 2010
    #2
    1. Advertising

  3. robert

    Lewis Guest

    Re: HTML head/meta: how to indicate the URL of a translated versionof the page

    In message <zfGuo.6877$>
    Jukka K. Korpela <> wrote:
    > robert wrote:


    >> Hello, is there a standard for how to point to translated versions
    >> of file.


    > No. The best way is to include, in a fairly prominent manner, a link like


    > French version ~ Version française:
    > <a href="index-fr.html" hreflang="fr" lang="fr">La vie, l&rsquo;univers et
    > tout ce qui es</a>


    Oh, I think a upper right French flag and English flag with the English
    flag selected is enough to indicate there's a French version. And it
    scales well if you have several translations.

    And besides, no one wants to see French polluting an English page! :)

    --
    'The trouble with my friend here is that he doesn't know the difference
    between a postulate and a metaphor of human existence. Or a hole in the
    ground.' --Pyramids
    Lewis, Oct 18, 2010
    #3
  4. robert

    Dylan Parry Guest

    Re: HTML head/meta: how to indicate the URL of a translated version of the page

    Lewis <> wrote:
    > In message <zfGuo.6877$>


    > Oh, I think a upper right French flag and English flag with the
    > English
    > flag selected is enough to indicate there's a French version.


    Oh dear. I don't think you realise what you've started here ;)

    There are a number of reasons why flags are bad, but the main one is
    that flags are a symbol of culture not language—which flag do you use
    for English? The British
    Union flag? The US Stars and Stripes? You'll either confuse one group of
    people or offend another…

    --
    Dylan Parry
    Dylan Parry, Oct 18, 2010
    #4
  5. robert

    Sjeef Guest

    Re: HTML head/meta: how to indicate the URL of a translated version of the page

    "Dylan Parry" <> schreef in bericht
    news:-september.org
    > Lewis <> wrote:
    >> In message <zfGuo.6877$>

    >
    >> Oh, I think a upper right French flag and English flag with the
    >> English
    >> flag selected is enough to indicate there's a French version.

    >
    > Oh dear. I don't think you realise what you've started here ;)
    >
    > There are a number of reasons why flags are bad, but the main one is
    > that flags are a symbol of culture not language-which flag do you use
    > for English? The British
    > Union flag? The US Stars and Stripes? You'll either confuse one group
    > of people or offend another.


    A combination solves the problem.
    See:
    http://www.google.nl/imgres?imgurl=...1sdMM&esq=1&page=1&ndsp=15&ved=1t:429,r:3,s:0

    --
    Regards,

    Gerard Schaefers

    Website: http://www.sjeef.eu
    Sjeef, Oct 18, 2010
    #5
  6. robert

    Peter Guest

    Re: HTML head/meta: how to indicate the URL of a translated version of the page

    In article <2035175100309075008.273404usenet-
    -september.org>,
    says...
    > Lewis <> wrote:
    > > In message <zfGuo.6877$>

    >
    > > Oh, I think a upper right French flag and English flag with the
    > > English
    > > flag selected is enough to indicate there's a French version.

    >
    > Oh dear. I don't think you realise what you've started here ;)
    >
    > There are a number of reasons why flags are bad, but the main one is
    > that flags are a symbol of culture not languageâ¤=3Fwhich flag do you use
    > for English? The British
    > Union flag? The US Stars and Stripes? You'll either confuse one group of
    > people or offend anotherâ¤=3F
    >
    >


    I wouldn't worry about offending people. If they're that easily offended
    by a flag image then they've got issues.

    --
    Pete Ives
    Remove All_stRESS before sending me an email
    Peter, Oct 18, 2010
    #6
  7. Re: HTML head/meta: how to indicate the URL of a translated versionof the page

    Dylan Parry wrote:
    > Lewis<> wrote:
    >> In message<zfGuo.6877$>

    >
    >> Oh, I think a upper right French flag and English flag with the
    >> English
    >> flag selected is enough to indicate there's a French version.

    >
    > Oh dear. I don't think you realise what you've started here ;)
    >
    > There are a number of reasons why flags are bad, but the main one is
    > that flags are a symbol of culture not language—which flag do you use
    > for English? The British
    > Union flag? The US Stars and Stripes? You'll either confuse one group of
    > people or offend another…
    >


    I would think a better method would be textual links with the language
    name in that language:

    English Français Deutsch ...

    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
    Jonathan N. Little, Oct 18, 2010
    #7
  8. Re: HTML head/meta: how to indicate the URL of a translated version of the page

    Peter wrote:

    > I wouldn't worry about offending people. If they're that easily
    > offended by a flag image then they've got issues.


    If you are running some sort of business, I'm sure your competitors will be
    grateful.

    --
    Yucca, http://www.cs.tut.fi/~jkorpela/
    Jukka K. Korpela, Oct 18, 2010
    #8
  9. Re: HTML head/meta: how to indicate the URL of a translated version of the page

    Lewis wrote:

    > Oh, I think a upper right French flag and English flag with the
    > English flag selected is enough to indicate there's a French version.


    You're trolling, right? Especially the expression "English flag" makes it
    rather obvious - or are your seriously suggesting the use of the flag of
    England, or don't you just know the difference between it and the Union
    Flag?

    > And besides, no one wants to see French polluting an English page! :)


    If you think that way, you had better stick to using one language only on
    your site.

    Consider yourself as a visitor, in a similar situation, just with a bit
    different languages. Suppose that you don't know Chinese at all and that one
    day, perhaps innocently following an interesting-looking link, you stumble
    across a web page in all Chinese. Not a single letter, still less a word,
    you would recognize. But there's a a tiny little Union Flag somewhere. Now,
    would you click on it to get some idea of where you might be? Even if you
    would have something else to do? After all, you have now _no_ idea of what
    the site might be about. (You might guess something from its images, if any,
    but of course at your own risk, and often wrong.) And some day, you will
    stumble across a page where the flag is used as a proper symbol, pointing to
    a page about the United Kingdom, presumably in Chinese.

    Compare this with seeing the text
    This page in English: Life, universe, and everything
    with the second part as a link. (Imagine something that might really
    interest you in place of this dummy link text.)

    --
    Yucca, http://www.cs.tut.fi/~jkorpela/
    Jukka K. Korpela, Oct 18, 2010
    #9
  10. robert

    Lewis Guest

    Re: HTML head/meta: how to indicate the URL of a translated versionof the page

    In message <-september.org>
    Dylan Parry <> wrote:
    > Lewis <> wrote:
    >> In message <zfGuo.6877$>


    >> Oh, I think a upper right French flag and English flag with the
    >> English
    >> flag selected is enough to indicate there's a French version.


    > Oh dear. I don't think you realise what you've started here ;)


    > There are a number of reasons why flags are bad, but the main one is
    > that flags are a symbol of culture not language—which flag do you use
    > for English? The British Union flag?


    Yes, and I'm an American. I'd use the US flag if there were separate UK
    and US English pages, but I can't imagine that.

    But, in the interest of inconsistency, I'd use the Mexican flag for
    Spanish. This is because the Mexican flag is more distinctive than the
    Spanish flag which, especially at small sizes, looks like several
    others. The Mexican just looks like the Italian, but with a blob in the
    middle, so obviously not Italian. My Spanish friend finds this very
    annoying :)

    > The US Stars and Stripes? You'll either confuse one group of people or
    > offend another…


    When my youngest son was 5 he was confused as to which flag to choose
    for English, but only the one time.

    --
    Rid yourself of doubt -- or should you? -George Carlin
    Lewis, Oct 18, 2010
    #10
  11. robert

    Lewis Guest

    Re: HTML head/meta: how to indicate the URL of a translated versionof the page

    In message <S3Zuo.7125$>
    Jukka K. Korpela <> wrote:
    > Lewis wrote:


    >> Oh, I think a upper right French flag and English flag with the
    >> English flag selected is enough to indicate there's a French version.


    > You're trolling, right? Especially the expression "English flag" makes it
    > rather obvious - or are your seriously suggesting the use of the flag of
    > England, or don't you just know the difference between it and the Union
    > Flag?


    Oh right, I forgot the silly Brits have like 14 flags. I meant the Union
    Flag, not the *English* English flag. I know it annoys my Scottish
    friends, but sometimes I do forget and refer to the UK as "England." My
    excuse is my forbearers are from England, and people in England do that
    same thing!

    >> And besides, no one wants to see French polluting an English page! :)


    > If you think that way, you had better stick to using one language only on
    > your site.


    And I even included a smilie for the humor impaired.

    > Consider yourself as a visitor, in a similar situation, just with a bit
    > different languages. Suppose that you don't know Chinese at all and that one
    > day, perhaps innocently following an interesting-looking link, you stumble
    > across a web page in all Chinese. Not a single letter, still less a word,
    > you would recognize. But there's a a tiny little Union Flag somewhere. Now,
    > would you click on it to get some idea of where you might be? Even if you
    > would have something else to do? After all, you have now _no_ idea of what
    > the site might be about. (You might guess something from its images, if any,
    > but of course at your own risk, and often wrong.) And some day, you will
    > stumble across a page where the flag is used as a proper symbol, pointing to
    > a page about the United Kingdom, presumably in Chinese.


    When I land on pages in foreign languages I start hunting for the Union
    Jack. If I can't find it, then I move on. Or I go to Google Translation
    Services for a good chuckle.

    > Compare this with seeing the text
    > This page in English: Life, universe, and everything
    > with the second part as a link. (Imagine something that might really
    > interest you in place of this dummy link text.)


    My point is that text takes up a LOT of room; especially when you have 5
    or 10 or 32 different languages.

    --
    Rent a flat above a shop, cut your hair and get a job, smoke some fags
    and play some pool, pretend you never went to school and still you'll
    never get it right cuz when you're lay'n in bed at night watching
    roaches climb the wall if you called your dad he could stop it all.
    Lewis, Oct 18, 2010
    #11
  12. Re: HTML head/meta: how to indicate the URL of a translated version of the page

    Lewis wrote:

    > Oh right, I forgot the silly Brits have like 14 flags.


    Thank you for confirming that you are a troll, and a boring one at that.

    > And I even included a smilie for the humor impaired.


    Contrary to popular superstition, "smilies" do not make stupidity any less
    stupid.

    > My point is that text takes up a LOT of room; especially when you
    > have 5 or 10 or 32 different languages.


    I don't think you ever created a site with even two (2) languages. I'm not
    so sure about one language either, since people who use forged Internet
    domains when posting to Usenet typically lack clues, sites, and manners.

    --
    Yucca, http://www.cs.tut.fi/~jkorpela/
    Jukka K. Korpela, Oct 18, 2010
    #12
  13. robert

    Lewis Guest

    Re: HTML head/meta: how to indicate the URL of a translated versionof the page

    In message <JL2vo.7328$>
    Jukka K. Korpela <> wrote:
    > Lewis wrote:


    >> Oh right, I forgot the silly Brits have like 14 flags.


    > Thank you for confirming that you are a troll, and a boring one at that.


    Fortunately your opinion is irrelevant.

    >> And I even included a smilie for the humor impaired.


    > Contrary to popular superstition, "smilies" do not make stupidity any less
    > stupid.


    >> My point is that text takes up a LOT of room; especially when you
    >> have 5 or 10 or 32 different languages.


    > I don't think you ever created a site with even two (2) languages. I'm not
    > so sure about one language either, since people who use forged Internet
    > domains when posting to Usenet typically lack clues, sites, and manners.


    gmail.com is not a forged domain. If you are too stupid to figure that
    out, that is your problem.

    --
    i wasn't born a programmer. i became one because i was impatient. - Dave
    Winer
    Lewis, Oct 19, 2010
    #13
  14. robert

    Lewis Guest

    Re: HTML head/meta: how to indicate the URL of a translated versionof the page

    In message <>
    dorayme <> wrote:
    > In article <JL2vo.7328$>,
    > "Jukka K. Korpela" <> wrote:


    >> Lewis wrote:
    >>
    >> > Oh right, I forgot the silly Brits have like 14 flags.

    >>
    >> Thank you for confirming that you are a troll, and a boring one at that.
    >>
    >> > And I even included a smilie for the humor impaired.

    >>
    >> Contrary to popular superstition, "smilies" do not make stupidity any less
    >> stupid.
    >>
    >> > My point is that text takes up a LOT of room; especially when you
    >> > have 5 or 10 or 32 different languages.

    >>
    >> I don't think you ever created a site with even two (2) languages. I'm not
    >> so sure about one language either, since people who use forged Internet
    >> domains when posting to Usenet typically lack clues, sites, and manners.


    > As an experienced troll myself, (in other words, I should know),
    > I can tell you that Jukka Korpela's remarks are largely true in
    > this case.


    > Lewis is probably confused between the idea of countries with
    > lots of silly flags and silly countries with flags - a logical
    > mistake with little excuse. I don't think Aristotle had a form
    > for this one?


    Please, Prince Charles has at least 5 flags all his own. His mum has
    three. England, Scotland, Wales, and NI all have their own flag in
    addition to the Union Jack and the British military has dozens. And we
    haven't even mentioned the Channel Islands, the Isle of Man, or any of
    the overseas territories, every one of which has its own flag.

    The Brits love flags.

    --
    'It's always a good thing to let a few tales spread, you know. Pour
    encouragy le-poor encoura-to make everyone sit up and damn well take
    notice.' --Eric
    Lewis, Oct 19, 2010
    #14
  15. Re: HTML head/meta: how to indicate the URL of a translated version of the page

    robert <> wrote:

    > Hello, is there a standard for how to point to translated versions
    > of file.
    >
    > e.g. on a english HTML with
    > <meta name="language" content="en">
    >
    > to add something like
    >
    > <meta/link...
    > RELATED_UNKOWNATTRIBUTES lang="fr" href='index-fr.html' >


    You need to do this at the server level. If you are using Apache you can
    use Mod Rewrite to have it serve up the appropriate language page according
    to the user's browser-declared preference. All users should see the same
    URL, e.g. index.html, but the actual page served up will be something like
    index.html.fr or index.html.en etc, according to what language their
    browser indicates is preferred.

    Having said that you should still have a way for users to manually switch
    languages since it is not uncommon for browsers to be misconfigured or for
    people to be accessing a site via a system which is not set up for their
    own language.
    Gordon Freeman, Oct 24, 2010
    #15
  16. Re: HTML head/meta: how to indicate the URL of a translated version of the page

    Gordon Freeman wrote:

    > robert <> wrote:
    >
    >> Hello, is there a standard for how to point to translated versions
    >> of file.

    [...]
    > You need to do this at the server level.


    No you don't.

    > If you are using Apache you can use Mod Rewrite


    The question was about linking, and it requires no such thing.

    Besides, if you are using Apache, then you _maybe_ can use such things.
    Server admin (of an ISP, for example) may well prevent some authors (e.g.,
    customers who don't pay enough) from affecting server behavior.

    > to have it serve up the appropriate language page
    > according to the user's browser-declared preference.


    This is something completely different from the question that was asked, and
    much more complex than you describe. To begin with, the "browser-declared
    preference" is in the vast majority of cases just a setting in the browser
    based on the browser's own interface language - most users have no idea of
    the existence of such a setting, still less about using it. Popular browsers
    do not even let the user specify the language preferences the way the
    protocol suggests - only as an ordered list of languages, getting weights
    according to a simplistic algorithm.

    > Having said that you should still have a way for users to manually
    > switch languages


    This is what the question was about.

    > since it is not uncommon for browsers to be
    > misconfigured or for people to be accessing a site via a system which
    > is not set up for their own language.


    That's an understatement.

    Besides, e.g. people who use Firefox as browser and Thunderbird as (an
    excuse for) an email program and a newsreader will have their language
    preferences, as set in the browser, communicated to the world in message
    headers. Among the few people who know about those settings, there are
    probably many who are aware of this security hole and therefore refrain from
    setting language preferences, especially since very few sites actually use
    them - and no well-designed site _relies_ on them.

    --
    Yucca, http://www.cs.tut.fi/~jkorpela/
    Jukka K. Korpela, Oct 24, 2010
    #16
  17. robert

    Dan Guest

    Re: HTML head/meta: how to indicate the URL of a translated versionof the page

    On Oct 24, 4:50 am, "Jukka K. Korpela" <> wrote:
    > Besides, e.g. people who use Firefox as browser and Thunderbird as (an
    > excuse for) an email program and a newsreader will have their language
    > preferences, as set in the browser, communicated to the world in message
    > headers. Among the few people who know about those settings, there are
    > probably many who are aware of this security hole and therefore refrain from
    > setting language preferences, especially since very few sites actually use
    > them - and no well-designed site _relies_ on them.


    I've got some discussion of language settings and related issues here:

    http://webtips.dan.info/language.html
    Dan, Oct 25, 2010
    #17
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. mike
    Replies:
    13
    Views:
    637
  2. V Green
    Replies:
    0
    Views:
    823
    V Green
    Feb 5, 2008
  3. PA Bear [MS MVP]
    Replies:
    0
    Views:
    929
    PA Bear [MS MVP]
    Feb 5, 2008
  4. bhabs
    Replies:
    2
    Views:
    369
    Tad J McClellan
    Feb 13, 2008
  5. Alexandre Damiron
    Replies:
    0
    Views:
    141
    Alexandre Damiron
    Nov 29, 2005
Loading...

Share This Page