Source for file function.pnformlanguageselector.php
Documentation is available at function.pnformlanguageselector.php
* Language selector plugin
* @copyright (c) 2006, Zikula Development Team
* @link http://www.zikula.org
* @version $Id: function.pnformtextinput.php 21046 2007-01-11 21:36:57Z jornlind $
* @license GNU/GPL - http://www.gnu.org/copyleft/gpl.html
* @package Zikula_Template_Plugins
/** Make sure to use require_once() instead of Loader::requireOnce() since "function.pnformdropdownlist.php"
is loaded by Smarty (the base render class) with the use of require_once(). We do not want to
get in conflict with that.*/
require_once 'system/pnForm/plugins/function.pnformdropdownlist.php';
// But this one is included by the Zikula framework, so use Loader::requireOnce
* This plugin creates a language selector using a dropdown list.
* The selected value of the base dropdown list will be set to the 3-letter language code of
* Enable or disable use of installed languages only
* Normally you can only choose one of the installed languages with the language selector,
* but by setting onlyInstalledLanguages to false you can get a list of all possible language.
* Add an option 'All' on top of the language list
return __FILE__ ; // FIXME: should be found in smarty's data???
function load(&$render, $params)
$this->addItem('---', null);
foreach ($langList as $key)
$this->addItem($allLang[$key], $key);
foreach ($langList as $key => $text)
$this->addItem($text, $key);
parent::load($render, $params);
return $render->pnFormRegisterPlugin('pnFormLanguageSelector', $params);
|