本文整理汇总了PHP中Translator::loadSupportedLanguagesInSession方法的典型用法代码示例。如果您正苦于以下问题:PHP Translator::loadSupportedLanguagesInSession方法的具体用法?PHP Translator::loadSupportedLanguagesInSession怎么用?PHP Translator::loadSupportedLanguagesInSession使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Translator
的用法示例。
在下文中一共展示了Translator::loadSupportedLanguagesInSession方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getAuthorMediaManager
/**
* function getAuthorMediaManager, used to manage the properties of each author's media already uploaded.
* It is possible for the user to set some properties and save them on DB.
*
* @param int $id_course
* @param string $fckeditorInstance
* @return string
*/
public static function getAuthorMediaManager()
{
$form = CDOMElement::create('form', 'id:properties_media, class:editor_form');
/*
$form = CDOMElement::create('form',"id:uploadfile, name:uploadfileform, enctype:multipart/form-data,
action:$php_file_uploader, method:post");
$form->setAttribute('onclick','enterUploadFileState();');
*
*/
$textarea_div = CDOMElement::create('div', 'id:jstextarea_media_div');
// Title
$title_label = CDOMElement::create('DIV');
$title_label->setAttribute('class', 'label_extended');
$title_label->addChild(new CText(translateFN('title')));
$span_title_area = CDOMElement::create('div', 'id:title_media,class:editor_input');
$title_area = CDOMElement::create('text', 'id:jsdata_titlesarea, name:titolo');
$title_area->setAttribute('value', translateFN('Scrivi il titolo'));
$span_title_area->addChild($title_area);
// preview
// $title_label = CDOMElement::create('DIV');
// $title_label->setAttribute('class', 'label_extended');
// $title_label->addChild(new CText(translateFN('title')));
$span_preview_area = CDOMElement::create('div', 'id:preview_media,class:media_preview');
// Description
$description_label = CDOMElement::create('DIV');
$description_label->setAttribute('class', 'label_extended');
$description_label->addChild(new CText(translateFN('description')));
$span_description_area = CDOMElement::create('div', 'id:description_media,class:editor_input');
$description_area = CDOMElement::create('textarea', 'id:jsdata_descriptionarea, name:descrizione');
$description_area->addChild(new CText(translateFN('Scrivi la descrizione')));
// $description_area->setAttribute('value', translateFN('Scrivi la descrizione'));
$span_description_area->addChild($description_area);
// keywords
$keywords_label = CDOMElement::create('DIV');
$keywords_label->setAttribute('class', 'label_extended');
$keywords_label->addChild(new CText(translateFN('keywords')));
$span_keywords_area = CDOMElement::create('div', 'id:keywords,class:editor_input');
$keywords_area = CDOMElement::create('text', 'id:jsdata_keywordsarea, name:keywords');
$keywords_area->setAttribute('value', translateFN('Scrivi le keywords'));
$span_keywords_area->addChild($keywords_area);
// pubblicato
// $keywords_label = CDOMElement::create('DIV');
// $keywords_label->setAttribute('class', 'label_extended');
// $keywords_label->addChild(new CText(translateFN('keywords')));
$span_published_area = CDOMElement::create('div', 'id:published,class:editor_input');
$span_published_area->addChild(new CText(translateFN('published')));
$published_check = CDOMElement::create('checkbox', 'id:jsdata_published, name:published');
$published_check->setAttribute('checked', 'true');
$span_published_area->addChild($published_check);
// language
Translator::loadSupportedLanguagesInSession();
$supported_languages = Translator::getSupportedLanguages();
$select = CDOMElement::create('select', 'id:p_selected_language, name:lingua');
foreach ($supported_languages as $language) {
$option = CDOMElement::create('option', "value:{$language['id_lingua']}");
if (isset($login_page_language_code) && $language['codice_lingua'] == $login_page_language_code) {
$option->setAttribute('selected', 'selected');
}
$option->addChild(new CText($language['nome_lingua']));
$select->addChild($option);
}
// extended media type
$select_extended_media_type = CDOMElement::create('select', 'id:p_selected_media_extended_type, name:tipo');
$option_media_type = CDOMElement::create('option', "value:'0'");
$option_media_type->addChild(new CText(translateFN('inserisci tipo media')));
$select_extended_media_type->addChild($option_media_type);
$hidden_input_id_risorsa_ext = CDOMElement::create('hidden', 'name:id_risorsa_ext', 'value:0');
$hidden_copy = CDOMElement::create('hidden', 'name:copyright', 'value:1');
$textarea_div->addChild($title_label);
$textarea_div->addChild($span_title_area);
$textarea_div->addChild($span_preview_area);
$textarea_div->addChild($keywords_label);
$textarea_div->addChild($span_keywords_area);
$textarea_div->addChild($description_label);
$textarea_div->addChild($span_description_area);
$textarea_div->addChild($span_published_area);
$textarea_div->addChild($select);
$textarea_div->addChild($select_extended_media_type);
$textarea_div->addChild($hidden_input_id_risorsa_ext);
$textarea_div->addChild($hidden_copy);
/*
$span_select = CDOMElement::create('div','id:span_properties_media, class:editor_input');
$key_label =
$keywords = CDOMElement::create('select','id:jsid_properties_files, size:10');
foreach ( $author_media as $media ) {
$ada_filetype = Utilities::getFileHintFromADAFileType($media['tipo']);
$value = "{$media['tipo']}|{$media['nome_file']}";
$option = CDOMElement::create('option');
$option->setAttribute('value', $value);
$option->addChild(new CText("$ada_filetype {$media['nome_file']}"));
$select->addChild($option);
//.........这里部分代码省略.........
示例2: realpath
require_once realpath(dirname(__FILE__)) . '/config_path.inc.php';
/**
* Clear node and layout variable in $_SESSION
* $_SESSION was destroyed, so we do not need to clear data in session.
*/
$allowedUsersAr = array(AMA_TYPE_VISITOR, AMA_TYPE_STUDENT, AMA_TYPE_TUTOR, AMA_TYPE_AUTHOR, AMA_TYPE_ADMIN);
/**
* Performs basic controls before entering this module
*/
require_once ROOT_DIR . '/include/module_init.inc.php';
$self = index;
include_once 'include/' . $self . '_functions.inc.php';
/**
* Negotiate login page language
*/
Translator::loadSupportedLanguagesInSession();
$supported_languages = Translator::getSupportedLanguages();
$login_page_language_code = Translator::negotiateLoginPageLanguage();
$_SESSION['sess_user_language'] = $login_page_language_code;
/**
* Track kiosk accesses
*/
$_SESSION['ada_access_from'] = ADA_KIOSK_ACCESS;
$_SESSION['ada_remote_address'] = $_SERVER['REMOTE_ADDR'];
/*
* Load news file
*/
$newsfile = 'news_' . $login_page_language_code . '.txt';
$infofile = 'info_' . $login_page_language_code . '.txt';
$helpfile = 'help_' . $login_page_language_code . '.txt';
/*