How to update the language in a existing node entity? Using kint($node) gives me some availables methods to use but none seems to be able to set the language of the node

By guessing i found $node-&gt;landcode which gives me a method setLangcode($langcode) but it does not work

After loading the $node-&gt;langcode-&gt;setLangcode('cat'); and $node-&gt;save();, the node in the interface still have not updated the language
You should be using the get()/set() methods (of the FieldableEntityInterface), sth like this:

// Get the current node's language.
$node-&gt;get('langcode')-&gt;value;
// Set the current node's language.
$node-&gt;set('langcode', 'de');
// Save the node to persist the change.
$node-&gt;save();


Hope this answers the question for you.