REST Server api to Add/Edit Entity translations

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
Anonymous's picture

Is it possible to add/modify the translation fields from the REST api? So far I can only seem to update the source text.
The ultimate goal is to be able to provide the translations through the api. Has anyone tried this?

Comments

clarification

timbot's picture

Do you mean node translations, or just individual text string translations?

Re: Clarification

snarfman's picture

I'm referring to text string translations using the Entity translations. If I PUT this json to the server only the English body value is updated with new text. The node alredy exists and the body is already translated into both en and fr.

{"body" : {
"en" : [ {
"value" : "Should display EN body - updated by rest"
} ]
},
"fr" : [ {
"value" : "Should display FR body - updated by rest"
} ]
},
"type" : "article"
}

Services

Group organizers

Group categories

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week