Translations
JSON:API supports very simple multilingual functionality. It does not support advanced use cases.
It currently relies on Drupal's default language negotiation mechanisms to negotiate the appropriate language of an entity and fall back when that translation is not available. In the long term, we intend to move away from this mechanism while retaining backwards compatibility; we want to add a JSON:API-spec compliant, formal translation support.
The current language negotiation mechanism:
- works well for
GETrequests for individual resources, collection resources and includes. - does support
PATCHrequests on translations: updating translations is possible - does not support
DELETErequests: only the entire resource (entity) can be deleted, not just a translation - has limited
POSTsupport: it does support creating an entity with a non-default langcode in aPOSTbut does not allow creating additional translations
These are consequences of the peculiarities of the underlying Entity API's translation handling. To follow development of complete and formal support for translations, see: #2794431: [META] Formalize translations support
Help improve this page
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion
Still on Drupal 7? Security support for Drupal 7 ended on 5 January 2025. Please visit our Drupal 7 End of Life resources page to review all of your options.