Source for file function.get_country_name_for_country_code.php
Documentation is available at function.get_country_name_for_country_code.php
* Zikula Application Framework
* @copyright (c) 2004, Zikula Development Team
* @link http://www.zikula.org
* @version $Id: outputfilter.pagevars.php 19321 2006-06-29 13:15:10Z markwest $
* @license GNU/GPL - http://www.gnu.org/copyleft/gpl.html
* @package ZikulaTemplate_Plugins
* Smarty function to get a country name from a given country name
* - assign: If set, the results are assigned to the corresponding variable instead of printed out
* - code: Country code to get the corresponding name for
* <!--[get_country_name_for_country_code code=ZZ]-->
* @since 12 December 2007
* @param array $params All attributes passed to this function from the template
* @param object &$smarty Reference to the Smarty object
* @return string the value of the last status message posted, or void if no status message exists
$code = isset ($params['code']) ? $params['code'] : 'ZZ';
$assign = isset ($params['assign']) ? $params['assign'] : null;
if (isset ($countries[$code])) {
$result = $countries[$code];
$result = $countries['ZZ'];
$smarty->assign ($assign, $result);
|