Save multiple locale data via plugin I'm trying to import data from another database using locales, but am having trouble saving the other locale after the primary locale is saved.

foreach($row as $data) {

    $entry = new EntryModel();
    $entry-&gt;sectionId   = 1;
    $entry-&gt;typeId      = 1;
    $entry-&gt;authorId    = 1;
    $entry-&gt;enabled     = true;
    $entry-&gt;locale      = "en";

    $entry-&gt;getContent()-&gt;setAttributes(array(
        'description' =&gt; $data["description-en"],
    ));

    $success = craft()-&gt;entries-&gt;saveEntry($entry);

    if ($success) 
    {
        ImportPlugin::log('Successfully saved entry "'.$entry-&gt;id.'"', LogLevel::Info);

        $entryEs = craft()-&gt;entries-&gt;getEntryById($entry-&gt;id, "es");
        $entryEs-&gt;getContent()-&gt;setAttributes(array(
            'description'   =&gt; $data["description-es"],
        ));

        // **** The following doesn't work for some reason ****

        craft()-&gt;entries-&gt;saveEntry($entryEs);
    };
}


The primary entry saves fine and if I dump vars I can see that both $entry.id and $entryEs exist and are formatted as expected — but it doesn't save.

Is it perhaps being overwritten (or ignored) as the content from the primary locale is being copied to the other locales in the background? What's the recommended way to save multiple locales?
I just tried this and it works with Craft 2.3.2636. The only difference is this isn't using ContentModel::setAttributes(), but I wouldn't have thought that would affect it.

$entry = new EntryModel();
$entry-&gt;sectionId   = 2;
$entry-&gt;typeId      = 2;
$entry-&gt;authorId    = 1;
$entry-&gt;enabled     = true;
$entry-&gt;locale      = "en";

$entry-&gt;getContent()-&gt;title       = "English Title";
$entry-&gt;getContent()-&gt;description = "English description.";

if (craft()-&gt;entries-&gt;saveEntry($entry))
{
    $entryEs = craft()-&gt;entries-&gt;getEntryById($entry-&gt;id, "es");

    $entryEs-&gt;getContent()-&gt;title       = "Spanish Title";
    $entryEs-&gt;getContent()-&gt;description = "Spanish description.";

    craft()-&gt;entries-&gt;saveEntry($entryEs);
}