Scroll
Translations
SON: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
GET
requests for individual resources, collection resources and includes. - does support
PATCH
requests on translations: updating translations is possible - does not support
DELETE
requests: only the entire resource (entity) can be deleted, not just a translation - has limited
POST
support: it does support creating an entity with a non-default langcode in aPOST
but 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
Article from Drupal Documentation.