Problem/Motivation
may be relevant to #2135829: [PP-1] EntityResource: translations support
The problem is that when using multiple languages in the REST web service
we don't get back language specific results in the JSON data.
Steps to reproduce
- install fresh copy of Drupal 8
- install the restui contributed module (http://ftp.drupal.org/files/projects/restui-8.x-1.x-dev.tar.gz)
- enable the module (drush en restui -y)
- create a view with a REST export display and specify a path (for example /firstview) to get results in (export of the entire site is in this uploaded file, config.tar.gz)
- enable the Content Translation module
- create a new language other than English (mine was Traditional Chinese) /admin/config/regional/language
- create a piece of content, like an article.
- translate article
- call web service to get the results back in Traditional Chinese (curl -H 'Accept: application/json' --request GET http://d8/zh-hant/firstview )
- json results are in English
- expected Chinese for chinese language results
Proposed resolution
Remaining tasks
- (done) make the steps to reproduce details
- investigate cause
User interface changes
n/a
API changes
?
Comment | File | Size | Author |
---|---|---|---|
#1 | config.tar_.gz | 33.98 KB | zippydoug |
Comments
Comment #1
zippydoug CreditAttribution: zippydoug commentedComment #2
zippydoug CreditAttribution: zippydoug commentedmade steps to reproduce more specific.
Comment #3
Gábor HojtsyRight. In #2135829: [PP-1] EntityResource: translations support the argument is the REST endpoints should not be different per language and language should be a request detail (practically Accept-language: XXXXX). Until that question is resolved, there is no way to get to specific languages in REST I believe. Your feedback on #2135829: [PP-1] EntityResource: translations support would be very welcome.
Comment #4
Gábor HojtsyComment #5
Gábor HojtsySounds to me this is the same as #2135829: [PP-1] EntityResource: translations support. Please provide more feedback there.
Comment #6
clemens.tolboomI've added the steps to reproduce to #2135829: [PP-1] EntityResource: translations support
@zippydoug thanks for the steps.