I am trying to get translation data of pages from REST API. When callling /wp-json/wp/v2/pages endpoint, I get information about pages inside the website. How can I get information about the translations of that page, if they exist?
To retrieve the info of page/post in each language:
- If you are using the URL format as a directory per language, the URL to retrieve the Post will be: site.com/en/wp-json/wp/v2/posts?status=publish&_embed
- If you are using the language name as a parameter format, you can retrieve the post in each language in this way: - site.com/wp-json/wp/v2/posts?status=publish&_embed&lang=en
Let me know if that helps or if you need further assistance. I will be happy to help.
Best Regards,
Prosenjit
Manage Cookie Consent
We use cookies to optimize our website and services. Your consent allows us to process data such as browsing behavior. Not consenting may affect some features.
Functional
Always active
Required for our website to operate and communicate correctly.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
We use these to analyze the statistics of our site. Collected information is completely anonymous.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
These cookies track your browsing to provide ads relevant to you.