[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: content negotiation for language in web pages

> 	My proposal is this:
> 	Make all english pages have links with .html, all other language
> 	pages .html.<lang>. Make each page have a footer with links to .html
> 	.html.en .html.fr .html.de
This was the plan. It may not have been obvious as I felt I was being too verbose
as it was.

To do the links properly, avoid having to do changes by hand all the time
and not rely on any server abilities this should be done by a script.
I'll create separate directories for each language on master. The files
in these directories will only contain the body of the html. The script
will add a customized header and footer to each file and dump it into
the directory that gets mirrored (it checks the other directories for
the existance of the corresponding file before adding it to the list of
translations). This has the benefit of easily allowing other changes in
the header and footer (which have been done by hand in the past).

It will be up to each translator to make sure that the links all go somewhere
appropriate. I have a perl program that recursively checks URLs (got it
from Sue who can't remember who originally sent it to her). This makes the
job much easier.

> 	That way, mirrors will pick up all the .html.<lang>s
> 	and _also_ .html (the English version).
> 	1. If a user references .html.<lang>, all will work as planned.
> 	2. If he references .html, and the mirror does content-negotiation,
> 	he will get the language he wants (and if that is not English he
> 	will thereafter use the .html.<lang> links).
Unless it's a partial translation in which case they are fed back to the
english doc or their next preferred language. Again, content negotiation
should do the right thing.

> 	3. If he references .html, and the mirror does _not_ do negotiation,
> 	he will get english with links on the bottom. He will click the
> 	language he wants, see number 1.
> 	4. If he references a directory, see #2 or #3.
> 	It looks nice, and non-negotiating servers will still understand
> 	index.html. And negotiating servers will serve the language you ask,
> 	or default to English (.html).
> 	I don't see _any_ cons, as I don't consider the minor waste of disk
> 	space alarming.
Don't worry about disk space. The hand written pages are miniscule compared
to the Bug Lists and List Archives.

Sounds like we're getting somewhere. Any other comments before I do a test
setup and write the scripts?

- Jay

TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-www-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .

Reply to: