No body text saved when creating a node with I18n and specific language set Drupal 7

I'm creating a event type nodes, using data from an external database.  It's a multi-lingual site, and the primary language is english.

My code creates the node correctly, when the language is set to LANGUAGE_NONE, but when it is set to "en", the body text is not saved in the database.

foreach ($results as $record) {
  echo '&lt;br/&gt;Creating event: ' . $record-&gt;name;

  $node = new stdClass();
  $node-&gt;type = 'event';
  $node-&gt;uid = 1;
  node_object_prepare($node);

  $node-&gt;title    = $record-&gt;name;
  $node-&gt;language = "en";
  //$node-&gt;language = LANGUAGE_NONE;

  $node-&gt;body[$node-&gt;language][0]['value'] = 'This is a body text for '.$record-&gt;name;
  $node-&gt;body[$node-&gt;language][0]['summary'] = 'Here goes a summary for '.$record-&gt;name;
  $node-&gt;body[$node-&gt;language][0]['format'] = 'raw';

  $path = 'content/programmatically_created_node_' . date('YmdHis');
  $node-&gt;path = array('alias' =&gt; $path);

  $instance = field_info_instance('node', 'body', 'event');
  print_r($instance);

  $node = node_submit($node);
  node_save($node);  
  dpm($node);
}


When $node->language = LANGUAGE_NONE, a record is created in the fields_data_body table. I can see the body text, but cannot translate it.  I guess this is correct.

But when $node->language = "en", no record is created.  This is my problem.  I need this set to "en" as it's a multi-lingual site, and without it, there is no "translate" tab when editing the node (Internationalization module drupal.org/project/i18n)

There is some back history to this issue here..  No &quot;body&quot; when creating a node programatically, with Internationalization ..but it's not essential to read it.
It should be showing 'und' for language neutral nodes. Have you checked the value of the $node->language parameter?

You could also try creating one of these nodes with the user interface. Then install the devel module and use the php executor (whatever.com/devel/php) to load the node and output with dpm() to see the contents of the node. You probably have something wrong with the structure.

Example (after the sample node is created):

$node = node_load(21);
dpm($node);


That will output the node contents for you to help you better explore what you are creating.