0

I have over a dozen languages on my site and we use Json:Api since it's a decoupled drupal. Problem is that I can't figure out how to get the translated node values from the Json:Api response.

The Json:api url is as follows:

https://mysite.com/jsonapi/node/{bundle}/{uuid}?include=field_image,field_taxanomy

And it returns all the data with the relationships for the two extra fields included, but how do I request the data for a translation??? (almost each node has been translated into each of the available languages)

2
  • 2
    Have you tried simply (e.g.) https://mysite.com/fr/jsonapi/node/{bundle}/{uuid}?include=field_image,field_taxanomy. If not that, replace with whatever language negotiation method you're using in the Drupal site
    – Clive
    Commented Jan 14, 2021 at 12:02
  • @Clive Well i feel stupid :) Thanks. That's the correct answer
    – lordZ3d
    Commented Jan 14, 2021 at 12:05

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.