Setting API browser language

Hi,
I am trying to use the API browser to query our prismic content.
But I can't set the language parameter.
I have read the documentation which tells me to write lang=fr-fr
I write something similar and press enter but it does not add this as a parameter.

So how do I set the language?

1 Like

Hi Magnus,

Welcome to the community!

So in the article where it says:

To specify a particular language you want in a query, simply add the "lang" parameter to the query string and set it to the language code you are querying (example, "en-us" for American English).

It means you need to add the language code...
&lang=en-us

... to the end of the URL string like so:
https://slice-machine.prismic.io/api/v2/documents/search?ref=X3R_ChAAAD4vl5k8&q=[[at(document.type%2C+"page")]]&lang=en-us

Let me know if this makes sense.

Thanks.

1 Like

Hi Phil,

Yes that is easy to do. It works.

Thanks!
Magnus

1 Like