I'm trying to use Wordpress REST API, and I ran into a problem: the post slug and link are not being translated when listing posts using /wp-json/. I can set the language by passing "language=en" to the URL, but only the post title and content are translated correctly.
This is an example of the API call I'm using:
[blog url]/wp-json/wp/v2/posts?language=en
JSON returned:
In the above example, the slug I expected to be: how-to-create-a-dashboard and the link: [blog url]/en/how-to-create-a-dashboard/. Both are keeping their respective default language values.
Is this a bug, or am I using the API/Sublanguage the wrong way?
Hello!
I'm trying to use Wordpress REST API, and I ran into a problem: the post slug and link are not being translated when listing posts using /wp-json/. I can set the language by passing "language=en" to the URL, but only the post title and content are translated correctly.
This is an example of the API call I'm using:
[blog url]/wp-json/wp/v2/posts?language=en
JSON returned:
In the above example, the slug I expected to be:
how-to-create-a-dashboard
and the link:[blog url]/en/how-to-create-a-dashboard/
. Both are keeping their respective default language values.Is this a bug, or am I using the API/Sublanguage the wrong way?
Any help is appreciated.
Wordpress version: 4.9.4 Sublanguage version: 2.4