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

R

robert

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
 
J

Jukka K. Korpela

robert said:
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 said:
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.
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.
 
L

Lewis

In message said:
robert wrote:
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! :)
 
D

Dylan Parry

Lewis said:
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…
 
S

Sjeef

Dylan Parry said:
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
 
P

Peter

(e-mail address removed)-september.org>, (e-mail address removed)
says...
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.
 
J

Jonathan N. Little

Dylan said:
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 ...
 
J

Jukka K. Korpela

Peter said:
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.
 
J

Jukka K. Korpela

Lewis said:
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.)
 
L

Lewis

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.
 
L

Lewis

In message said:
Lewis wrote:
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!
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.
 
J

Jukka K. Korpela

Lewis said:
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.
 
L

Lewis

In message said:
Lewis wrote:
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.
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.
 
L

Lewis

In message said:
Lewis said:
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.
 
G

Gordon Freeman

robert said:
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.
 
J

Jukka K. Korpela

Gordon said:
robert said:
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.
 
D

Dan

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top