How can you retrieve entries with a specific locale in a plugin? I have this:

$this-&gt;requireAjaxRequest();

$segments = craft()-&gt;request-&gt;getActionSegments();

$lang = $segments[2];

$entryId = $segments[3];

$entry = craft()-&gt;entries-&gt;getEntryById( $entryId );

$response = array(
    'titre' =&gt; $entry-&gt;typeChambre,
    'etage' =&gt; $entry-&gt;etage-&gt;label,
    'surface' =&gt; $entry-&gt;surface,
    'loyer' =&gt; $entry-&gt;loyer,
    'charges' =&gt; $entry-&gt;charges,
    'description' =&gt; $entry-&gt;description,
    'photos' =&gt; $entry-&gt;photosChambre
);

$this-&gt;returnJson($response);


Thanks
You'll want to use an ElementCriteriaModel:

$criteria = craft()-&gt;elements-&gt;getCriteria(ElementType::Entry);
$criteria-&gt;id = $entryId;
$criteria-&gt;locale = $lang;
$entry = $criteria-&gt;first();

if ($entry)
{
    $response = array(
        'titre' =&gt; $entry-&gt;typeChambre,
        'etage' =&gt; $entry-&gt;etage-&gt;label,
        'surface' =&gt; $entry-&gt;surface,
        'loyer' =&gt; $entry-&gt;loyer,
        'charges' =&gt; $entry-&gt;charges,
        'description' =&gt; $entry-&gt;description,
        'photos' =&gt; $entry-&gt;photosChambre
    );

    $this-&gt;returnJson($response);
}