Source for file function.html_select_languages.php
Documentation is available at function.html_select_languages.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 Zikula_Template_Plugins
* Smarty function to display a drop down list of languages
* - assign: If set, the results are assigned to the corresponding variable instead of printed out
* - name: Name for the control
* - id: ID for the control
* - selected: Selected value
* - installed: if set only show languages existing in languages folder
* - all: show dummy entry '_ALL' on top of the list with empty value
* <!--[html_select_languages name=language selected=eng]-->
* @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
if (!isset ($params['name']) || empty($params['name'])) {
$smarty->trigger_error('html_select_languages: parameter [name] required');
require_once $smarty->_get_plugin_filepath('function','html_options');
if (isset ($params['all']) && $params['all']) {
if (isset ($params['installed']) && $params['installed']) {
foreach ($languagelist as $code => $text) {
'selected' => isset ($params['selected']) ? $params['selected'] : null,
'id' => isset ($params['id']) ? $params['id'] : null,
'name' => $params['name']),
if (isset ($params['assign']) && !empty($params['assign'])) {
$smarty->assign($params['assign'], $html_result);
|