I have Drupal 8 site which interacts with a React component.

I want to expose one of my content type's content using REST export in views.

How do I set views path to create REST export for multilingual support?

For example, mysite/rest/export/data should give JSON data in English, while mysite/nl/rest/export/data or mysite/rest/export/data/nl should give JSON data in Dutch.

  • As a quick fix, have you tried to create two separate views, one for EN one for NL?
    – leymannx
    Commented Nov 20, 2018 at 10:52
  • 1
    @leymannx: It is not a good solution. But thanks for your reply.
    – Kalidasan
    Commented Nov 20, 2018 at 12:31

1 Answer 1


Found solution in two ways.


Add language in filter criteria as mentioned below.

enter image description here


1) Add language in contextual filter

2) Provide a default value & select path component(I have selected 2)

3) Provide view path as "rest/nl/export" - EN or NL provide your language code

enter image description here enter image description here

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.