Programmatically creating a node doesn't save custom fields
If you're using Rules anyway why don't you use the Create new entity action which should take care of everything? You will need to use the Set a data value action multiple times and possibly the Save entity action too.

In answer to your question I think you need to set the language before node_object_prepare so your code would become:

$nodo = new stdClass(); // Create a new node object
$nodo-&gt;type = "capitoli"; // Or page, or whatever content type you like
$nodo-&gt;language = 'it'; // Or e.g. 'en' if locale is enabled
node_object_prepare($nodo); // Set some default values


Also you don't need the node_submit($nodo) line