Forum OpenACS Q&A: Re: Webpage Translation - Parsing i18n messages

Collapse
Posted by Gustaf Neumann on
if i browse to http://dev.natopia.com/Retreats/details/luxury-eco-lodge-in-the-amazon-wildlife i see the "accept-language" settings from my browser in the first line. When i change the preferred language in my browser from en-us to pt, the value alters correctly (but the content of this page stays pt). When i click on the us-flag, the displayed language switches to en. I see from firebug that clicking on the flag causes cookie named "language" to be set, which seems to have higher precedence than accept-language.

So, it looks to me as:
a) setting "accept-language" has no effect on the locale of that site (setting it from a js-request won't change anything)
b) the locale is determined via cookie

Therefore, I would recommend to include "Cookie: language=pt" to the js request.

I am just making guesses from the distance. You should know your code in detail.

Hop this helps
-gustaf neumann