472,117 Members | 2,698 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,117 software developers and data experts.

Multi-language websites and IE

In IE (at least from version 5), you can change your prefered language, so
that for example the Windows Update page appears in another language than
the system default. Here's the process:

Tools ->
Internet Options ->
Languages ->
Add (choose language from list) ->
Move Up (move language to top of list)

I wonder if this is a general feature connected to something in HTML (like
the "lang" attribute), or only something connected to only Microsoft sites.
That is, if I have a site with the same page in different languages, will IE
automatically direct people to the right page, assuming I have a page that
matches a language in their language list?

The IE help only tells me:

"Some Web sites offer their content in several languages. To view these
pages in your preferred language, you can add languages to your list of
languages in Internet Explorer."

Is there any information for webmasters?

Thanks,

Gustaf
Jul 20 '05 #1
5 3190
Gustaf Liljegren schrieb:
"Some Web sites offer their content in several languages. To view these
pages in your preferred language, you can add languages to your list of
languages in Internet Explorer."

Is there any information for webmasters?


Search the Web for "Content Negotiation"
Many websites do this.
"MultiViews" is a good option in Apache.

HTH, Jan

--
And the beast shall be made legion. Its numbers shall be increased a
thousand thousand fold. The din of a million keyboards like unto a
great storm shall cover the earth, and the followers of Mammon shall
tremble. [from The Book of Mozilla, 3:31]

Jul 20 '05 #2
Gustaf Liljegren <gu*****@algonet.se> wrote:
In IE (at least from version 5), you can change your prefered
language, so that for example the Windows Update page appears in
another language than the system default.
The setting affects pages that are available in different languages in
a particular manner. Most browsers have similar features, though the
details vary.
I wonder if this is a general feature connected to something in
HTML (like the "lang" attribute), or only something connected to
only Microsoft sites.
Neither. It has nothing particular to do with HTML; it would work just
as fine for plain text, MS Word, and other document formats. And using
this feature involves no HTML markup.
That is, if I have a site with the same page
in different languages, will IE automatically direct people to the
right page, assuming I have a page that matches a language in their
language list?
No. You need to make the pages available in a particular manner. There
is a general protocol (content negotiation) for this, but its
implementation varies by server and by browser.
The IE help only tells me:

"Some Web sites offer their content in several languages. To view
these pages in your preferred language, you can add languages to
your list of languages in Internet Explorer."
Well, there's nothing wrong with the explanation as far as I can tell,
but it doesn't say very much.
Is there any information for webmasters?


The general idea is this:
The author put the different language versions on a server. He also
specifies a mechanism (such as a specific description file in a
particular format) that makes the pages _also_ available under a
common URL. When a browser or other client requests for a page using
that common URL, the server inspects the information it has about
available versions as well as an Accept-Language header in the HTTP
request; most browsers send such a header according to the preferences
that the user has set (or according to its default settings).
The server then decides which of the alternate versions matches best
the request, and sends it.

The most serious problem with this, IMHO, is that most users are
probably unaware of the language preference settings, or have even
misconfigured them since they have misunderstood what they are.
For example, if I buy a computer with an English version of Windows
(e.g. because I can understand its texts better than the artificial and
often wrong translations of in the Finnish version), I get an IE with
language preferences containing "en" (for English) only, or something
like that. Unless I fix that, and most people don't, my browser will
keep telling anyone interested that I _only_ know English. That is, the
content negotiation mechanism always gives me the English version.

See http://www.cs.tut.fi/~jkorpela/multi/ for more info.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html

Jul 20 '05 #3
Jukka K. Korpela wrote:

The general idea is this:
The author put the different language versions on a server. He also
specifies a mechanism (such as a specific description file in a
particular format) that makes the pages _also_ available under a
common URL. When a browser or other client requests for a page using
that common URL, the server inspects the information it has about
available versions as well as an Accept-Language header in the HTTP
request; most browsers send such a header according to the preferences
that the user has set (or according to its default settings).
The server then decides which of the alternate versions matches best
the request, and sends it.

it's not as difficult to do as I initially
expected...though it is something to do very
carefully...I suspect it is easy to make a complete mess
of it

The most serious problem with this, IMHO, is that most users are
probably unaware of the language preference settings, or have even
misconfigured them since they have misunderstood what they are.
For example, if I buy a computer with an English version of Windows
(e.g. because I can understand its texts better than the artificial and
often wrong translations of in the Finnish version), I get an IE with
language preferences containing "en" (for English) only, or something
like that. Unless I fix that, and most people don't, my browser will
keep telling anyone interested that I _only_ know English. That is, the
content negotiation mechanism always gives me the English version.

See http://www.cs.tut.fi/~jkorpela/multi/ for more info.


I'm still looking at a way of doing it "perfectly"

I haven't got a multilingual site to play with a at
present (anyone want an experienced multilingual web
developer and promoter at very reasonable rates?)...but
it strikes me that there is a generally applicable and
not too cumbersome solution

it requires a second copy of the index page in each
language (and possibly sub indexes if they are promoted
separately)...so one has almost identical content on
index.html an default.html in each language...content
negotiation is applied to index html...which also has
text links to default html in each language...subsidiary
pages link to and through default html

so content negotiation is applied once on arrival...and
supplies a (Unicode?) page that allows the user to use a
text link to change to a preferred language...after that
the assumption is that the user has now chosen the
language and that choice should be respected...though a
link should be given to a "language switching page" for
those of us who do inconsiderate things such as search
for the same information in several languages

it means that when the index is updated two files have to
change rather than one...but for situations where that
happens frequently then it is surely not beyond the wit
of developer to use SSI to include the same content in
both pages...the only thing that is different is a
language menu on one of the pages

there is probably a hideous flaw in the idea somewhere

--
eric
www.ericjarvis.co.uk
"Hey Lord don't ask me questions
There ain't no answer in me"
Jul 20 '05 #4
Eric Jarvis <we*@ericjarvis.co.uk> exclaimed in <MP************************@news.cis.dfn.de>:
there is probably a hideous flaw in the idea somewhere


With the way Murphy works - probably. But I've not found anything really
bad about it so far; we are using a variant of the method you outline
on Greytower.net.

Our setup consist, basically, of one document tree per language
provided. All documents are produced using Wmake from common templates,
so only the actual content change.

The structure looks like this:

webroot
\
- en
|
- no
|
- sv

and a small script determines the Accept-Language the first time a user
visits the main URI. The browser is then redirected to the subtree in
question. All links are relative, and so the user doesn't leave the
choosen subtree unless making that choice consciously.

On each page there is a cross-tree link so that if you choose a different
language you end up on the same one but in a different subtree.

So far it seems to work very well, and requires very little maintenance
outside of the actual content.

As you, I'm certain there are glaring errors in it all ;)

--
- Tina Holmboe Greytower Technologies
ti**@greytower.net http://www.greytower.net/
[+46] 0708 557 905
Jul 20 '05 #5
Tina Holmboe wrote:
Eric Jarvis <we*@ericjarvis.co.uk> exclaimed in <MP************************@news.cis.dfn.de>:
there is probably a hideous flaw in the idea somewhere


With the way Murphy works - probably. But I've not found anything really
bad about it so far; we are using a variant of the method you outline
on Greytower.net.


good to know it's already been tried and found
successful...now I just want the chance to do it with a
site that includes plenty of non-Latin languages :)

--
eric
www.ericjarvis.co.uk
"Hey Lord don't ask me questions
There ain't no answer in me"
Jul 20 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

37 posts views Thread by ajikoe | last post: by
4 posts views Thread by Frank Jona | last post: by
5 posts views Thread by bobwansink | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.