I'm currently prototyping a project in Drupal 8. I'm posting HAL json to /entity/node with the relevant headers to create nodes. I'm including translations as per this example:
{
"_links":{ "type":{"href":"https://localtest/rest/type/node/page"} },
"title":[{"value":"posted title en","lang":"en"}, {"value":"posted title de","lang":"de"}, {"value":"posted title fr","lang":"fr"}],
"body":[{"value":"posted body en","lang":"en"}, {"value":"posted body de","lang":"de"}, {"value":"posted body fr","lang":"fr"}]
}
This creates the node and the 2 translations. However, only the english version gets the title and body. Any other language just gets the relevant language's body and a blank title. I have tried this with an admin account to rule out permissions problems. I have manually added the translations to make sure titles are translatable and work.
Does any know why the titles are lost for translations when posting nodes?
Comments
Comment #1
wim leersComment #2
wim leersThis is a duplicate of #2344277: Importing node.title with translation fails.