Re: How do search engines index multilingual content?



On Fri, 3 Feb 2006, Manfred Kooistra wrote:

Anyway, I am glad you told me, cause I hadn't thought about it,
because my browsers do not transmit q=0.

It's already taken account of in the Apache negotiation algorithm,
I'm sure. This is why I'm trying to convince you that there *is no
need* for you to learn all the fine details of the negotiation RFC
and then try to implement it in some other way. It's already *built
in to the server that you use*.

What sense does q=0 make anyway?

Perhaps I should have written as my example

Accept-language: de;q=0,fr-CA,fr;q=0.5,*;q=0.1

As I understand it, that means (if French isn't available) "you can
send me any other language which you have, as long as it isn't
German". At least, I just tried something analogous[*], and got the
results that I expected.

[*] I actually tried Accept-language: *,en;q=0
which I reckon means "send me any language you have, as long
as it isn't English". The Apache site sent me German, in fact, for
those pages which I visited.


although I seem to remember having read that multiviews
won't work on my Apache version (1.3.33),

I don't see why not!!! It seems to me that you're accepting bogus
advice from somewhere.

but I may be mistaken.

I think so.

But again: Is HTTP_ACCEPT_LANGUAGE suported as an argument for
RewriteCond as in my example in my last post,

The important point that I was dealing with in my posting was that
this was the *wrong* solution, so I didn't go into the technical
details. I still say it's the *wrong* solution - don't be misled by
the fact that I'm now commenting on a technical detail.

But, speaking purely hypothetically, I don't see why it would not be
feasible to test that; it's certainly present in the environment when
I run a CGI script, for example. Why would it not be?

HTTP_ACCEPT_LANGUAGE = en-gb,en;q=0.7,de;q=0.3

At this moment, I am doing everything that I want with a PHP script,
which reads the accepted language from the browsers headers and
returns a permanent 301 redirect to the proper subdirectory.

That's got all the wrong properties with respect to intermediate
caches, for a start!

(The routine in PHP actualy evaluates all the languages and
qualities in the accept language header, matches them to a qualified
hierarchical list of available languages, and decides which one to
return.) I would prefer to use .htaccess for this, as this seems
much quicker to me,

I can only say that IMHO, Apache's built-in negotiation is likely to
be both quicker and more accurate than either. If you're not
satisfied with what MultiViews offers, you can set your own rules for
writing a type-map file.

good luck
.



Relevant Pages

  • Apache Content negotiation with Chinese zh-TW and zh-CN
    ... I am trying to get apache content negotiation to redirect only ... available) language types to Chinese web pages, ... variants of Chinese language tagspoint to English-suffix ... After reading the relevant sections on apache content negotiation, ...
    (comp.infosystems.www.authoring.html)
  • Re: XHTML 1.0 / 1.1 / 2.0
    ... I'm increasingly attracted by the idea of using Apache ... >> related to language: My pages are English, ... problematic as an unacceptable language variant. ... > symlink or soft link). ...
    (comp.infosystems.www.authoring.html)
  • Re: Execute Windows program from Perl script (??)
    ... if all you are doing is modifying the Apache config ... Or if you prefer you could do it more directly in Perl using StopService ... in a general purpose programming language. ... case knowing at least a half a dozen general purpose programming ...
    (comp.lang.perl.misc)
  • Re: Generated javascript from .pl files
    ... how many times have I written "Content Negotiation" already? ... better if you read the (Apache) docs on how CN automagically can work for you. ... AddHandler cgi-script .js ... in a specific directory holding his perl-generated javascript files. ...
    (comp.lang.javascript)
  • Re: Firefox ignores language settings
    ... bypassing any language negotiation that the server might ... >Different servers have different negotiation abilities, ... >languages, gets a 406 error, rather than my English pages anyway. ...
    (Fedora)