How can I bulk update the language for all content? I have a site that has been duplicated from an english site and has been translated into Italian.

I installed Italian as a language and have set it as default. However, all of the nodes created in the cloned site are still set to "english".

How can I bulk update the language for all content, either programmatically or directly with SQL?
Load the nodes entities and set its langcode column

For example:

$w_node = entity_load('node', $nid);
$w_node-&gt;set('langcode', $data_langcode);
$w_node-&gt;save();


To do it in bulk, i guesing that you should create a new action to be available in the defaults bluk operations for the admin/content view