Here's the way you can compare it using smarty:
PHP test file:
$languages = array();
$languages[] = array('id_lang' => 1, 'iso_code' => 'en', 'language_code' => 'en-us');
$languages[] = array('id_lang' => 6, 'iso_code' => 'it', 'language_code' => 'it');
$languages[] = array('id_lang' => 7, 'iso_code' => 'gb', 'language_code' => 'gb');
$smarty->assign('languages',$languages);
Smarty test file:
{assign var=my_lang_id value=6}
{foreach $languages as $lang}
{if $lang.id_lang eq $my_lang_id}
{$lang.iso_code} {$lang.language_code}
{/if}
{/foreach}
I hope that's what you needed because I don't know prestashop at all.