<?php
/**
  * Ahead WebSoft Technologies Pvt Ltd.
  * @copyright  Copyright 2006-2026 Ahead WebSoft Technologies Pvt Ltd.
  * @license    https://www.socialengine.com/policies
*/
class Fields_View_Helper_FieldCountry extends Fields_View_Helper_FieldAbstract
{
  public function fieldCountry($subject, $field, $value)
  {
    $locale = Zend_Registry::get('Zend_Translate')->getLocale();
    $territories = Zend_Locale::getTranslationList('territory', $locale, 2);

    if( !isset($territories[$value->value]) ) {
      return '';
    }

    return $this->encloseInLink($subject, $field, $value->value, $territories[$value->value]);
  }
}
