/**
* Get language by id.
*
* @param mixed $id
*
* @throws \eZ\Publish\API\Repository\Exceptions\NotFoundException If language could not be found by $id
*
* @return \eZ\Publish\SPI\Persistence\Content\Language
*/
public function load($id)
{
$languages = $this->languageMapper->extractLanguagesFromRows($this->languageGateway->loadLanguageData($id));
if (count($languages) < 1) {
throw new NotFoundException('Language', $id);
}
return reset($languages);
}