httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joshua Slive" <jsl...@gmail.com>
Subject Re: [users@httpd] Content Negotiation - English zh-TW and Chinese zh-CN
Date Mon, 07 Aug 2006 23:38:02 GMT
On 8/7/06, Alex Sink <Alex.Sink@vishay.com> wrote:
> We have Simplified Chinese language pages that we wish to serve only to our
> mainland Chinese customers, and have all other variants of Chinese language
> (example: zh-TW or zh-sg) tags default to English.
>
> Or put differently, I want zh* language-tags (from:
> http://www.iana.org/assignments/language-tags) to receive English pages and
> only zh-CN to receive our Simplified Chinese pages.
>
> I did try the fallback as well, but the plain "zh" tag among others would
> still default to Chinese pages for some reason -- even with the:
> "ForceLanguagePriority Prefer Fallback" option.  If I try the 'zh-sg' tag it
> defaults to the zh-CH page.
>
> My theory fell along the same lines as the other problem, where it falls
> back to the shortest letter code, zh and then picks the first alphabetical
> choice zh-CH and it never gets to the last step in the apache content
> negotiation where language priority would take effect.
>
> I am unsure if there is a workaround, but this seems like it might have a
> simple fix similar to what you suggested.  I have been unable to figure it
> out thus far and would appreciate any additional help.

The fallback to main language tags is described here:
http://httpd.apache.org/docs/2.2/content-negotiation.html#better
There is no way to turn off that behavior.

You could use mod_setenvif or mod_rewrite to set the prefer-language
env variable to en in these cases.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message