Re: Changing language on the Debian site is too cumbersome
set up per-lang virtualhosts
such as www-en.debian.org, www-de.debian.org, etc.
(of course using en.www..., de.www.... will also be OK here)
and set different prefer-language env variable.
then as long as all internal links are relative (not http(s)://...),
following links will stay under the same vhost
so their preferred hosts are kept,
which means his prefered-lang-selection will always be kept there.
http://httpd.apache.org/docs/2.4/en/env.html:
| prefer-language
| This influences mod_negotiation's behaviour. If it contains a language tag (such
| as en, ja or x-klingon), mod_negotiation tries to deliver a variant with that
| language. If there's no such variant, the normal negotiation process applies.
this way only vhost config is needed to achieve;
no change is needed in the contents.
no additional cost is needed.
note that you can test this locally using /etc/hosts or local dns daemon :)
> Each static page that is for a specific language could have the links in it
> contain the language code, so that when a link is clicked, the visitor
> is taken to the corresponding language-specific page instead of the general one.
> Or would this not work?
this will not make sense;
when a page is not translated, translators need to link to .en pages at the time;
then, when pages become translated, they need to change all links
that point the translated pages afterward.
it is much pain to change them as those are reverse-link,
people need to search and ...
yes, it can be done by a script,
but it is just loss of resources for almost no benefit.
--
victory
no need to CC me :-)
Reply to: