The website uses a cookie to store your most recent language selection.

If no "lang=foo" param is specified in the API query, it uses the
cookie to decide.  If you do specify "lang=foo" then it will override
the cookie.  You can use "lang=all" to include all languages.

In my apps I always specify a lang=foo param to avoid ambiguity with
the users' cookies.

-Chad

On Thu, Apr 16, 2009 at 1:05 AM, steve <[email protected]> wrote:
>
> I have a search question...
>
> How is language tracked when issuing queries via the search API?
>
> More specifically...  I noticed that when the rel="next" <link /> is
> returned with a set of search results, it never includes the
> "lang=foo" param.  Yet... When I follow the link in my browser I get
> the next page of results in the correct language for the query...
> Hmmm...
>
> If I close the browser window and launch a new query in a new window
> without specifying a lang param I've noticed that you process the
> query using the last language I used (ja, en, or whatever) so I'm
> assuming you're either using cookies or tying it to my IP address.
> Either way it seems really brittle.
>
> I'm bringing this issue up because while my project is currently "en"
> only, I'll likely need to support several different languages at
> somepoint.  And the way I have things architected a single machine
> could end up simultaniously issuing 2 different queries for 2
> different languages asynchronously.  It looks like if I always specify
> a "lang=foo" param (even when paginating results) I'm ok... I just
> want to make sure that's always going to be the case.
>
> -steve
>

Reply via email to