دعم لمعاملات tl=[lang] في API؟

Is there any way to access cooked content’s localized versions via API?

I tried via GET requests by adding ?tl=en as a parameter, but I get the original content, not the translation, as a return.

إعجاب واحد (1)

In general, if you want to find out about the API, the fastest way is to Reverse engineer the Discourse API

إعجاب واحد (1)

This already works for me, for example the current topic with .json?tl=fr gives the right response, notice that cooked is in French:

Ah but if I make a request as a crawler, I get this:

Title is in French but not the posts. This looks like a regression, can you have a look @nat?

إعجابَين (2)

I tried exactly that via /posts/id.json endpoint, but get just the original version in cooked.

Could you check on your end? https://meta.discourse.org/posts/1887991.json?tl=fr

That endpoint works for me, it returns cooked in French. If I switch to tl=es, it returns cooked in Spanish.

Are you calling these endpoints from a specific user? On my end, I am making the requests anonymously.

yep, I do them while logged in. And that’s actually what I am trying to achieve since I want to be able to GET posts from closed categories in our forum.

إعجاب واحد (1)

The tl param only works for anons.