Layout as a Service REST API is not working for the multilingual pages

97 views Asked by At

We are using the dotCMS's Layout as a service REST API to display page at the REACT framework. We have added multilingual pages in the dotCMS. When we are accessing those pages using API (LaaS) then we are getting English language page json. There is no way to get page's json for other languages.

https://dotcms.com/docs/latest/page-rest-api-layout-as-a-service-laas

1

There are 1 answers

0
fmontes On

Yes, you can do it, you just need to pass the language_id param to the endpoint, here is an example of a page I just created in the demo:

In both you can check the response in page.title you will see:

  • English: "I'm a page"
  • Spanish: "Soy una pagina"

Ans also the rendered property will give you the full html in the requested language version.