Multilingual content

Druxt has support for multilingual content in all modules and in various forms:

  • The DruxtClient and Store can fetch translated resources and collections
  • Druxt module components can specify language with the langcode prop
  • Theming can be done in language specific components

Getting started

The following Drupal patches are required to enable multilingual content in the JSON:API:


Add the following to your composer.json patches:

"drupal/druxt": {
    "": ""
"drupal/decoupled_router": {
    "": ""
"drupal/jsonapi_menu_items": {
    "": ""

Fetching a translated resource

All DruxtClient and DruxtStore methods and actions have support for a langcode prefix, falling back to the default language, as determined by the Drupal backend.

Example: Fetching a spanish recipe from the DruxtStore

this.$store.dispatch('druxt/getResource', {
  type: 'node--page',
  id: 'd8dfd355-7f2f-4fc3-a149-288e4e293bdd',
  prefix: 'es'

Langcode prop

DruxtModule components have a langcode prop to specify the language, as well as a computed lang prop containing the fallback languge if no langcode prop is provided.

Example: Rendering a DruxtEntity component in spanish


Language theme components

All Druxt modules provide language specific theme component options, allowing for language specific customisations.

Example: ~/components/druxt/entity/node/page/Es.vue