本文整理匯總了PHP中CAppUI::getAvailableLanguages方法的典型用法代碼示例。如果您正苦於以下問題:PHP CAppUI::getAvailableLanguages方法的具體用法?PHP CAppUI::getAvailableLanguages怎麽用?PHP CAppUI::getAvailableLanguages使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類CAppUI
的用法示例。
在下文中一共展示了CAppUI::getAvailableLanguages方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getProps
/**
* Get the properties of our class as string
*
* @return array
*/
function getProps()
{
$props = parent::getProps();
$props["source"] = "str notNull";
$props["language"] = "enum notNull list|" . implode('|', CAppUI::getAvailableLanguages()) . " default|fr";
$props["translation"] = "text notNull";
return $props;
}
示例2: CTranslationOverwrite
<?php
/**
* Edit Translation
*
* $Id$
*
* @package Mediboard
* @subpackage System
* @author SARL OpenXtrem <dev@openxtrem.com>
* @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html
* @version $Revision$
*/
CCanDo::checkEdit();
$translation_id = CValue::getOrSession("trad_id");
$language = CValue::getOrSession("language", CAppUI::pref("LOCALE", "fr"));
$languages = CAppUI::getAvailableLanguages();
$translation = new CTranslationOverwrite();
$translation->load($translation_id);
if ($translation->_id) {
$translation->loadOldTranslation();
}
//smarty
$smarty = new CSmartyDP();
$smarty->assign("translation", $translation);
$smarty->assign("language", $language);
$smarty->assign("languages", $languages);
$smarty->display("inc_edit_translation.tpl");