Set translated field I'm having some trouble finding how to handle field translations in the documentation.

I have a requirement to keep certain fields in English and Japanese. I periodically have to update nodes and taxonomy terms programmatically. I'm doing this with a combination of EntityQuery and the Entity class.

Is there a set function that takes a language code? For example;

$term-&gt;set('field_my_field', 'my value', 'ja');
You update another translation by getting an object for that language, and then you set the values of those fields.

$translation-&gt;set('field_my_field', 'my en value');
$translation = $term-&gt;getTranslation('ja');
$translation-&gt;set('field_my_field', 'my ja value');
$term-&gt;save();


Those translation objects are actually shallow clones that have a different internal active language code, so you can update multiple translations and then save, for example.