本文整理汇总了PHP中ZLanguage::getLanguageCodeLegacy方法的典型用法代码示例。如果您正苦于以下问题:PHP ZLanguage::getLanguageCodeLegacy方法的具体用法?PHP ZLanguage::getLanguageCodeLegacy怎么用?PHP ZLanguage::getLanguageCodeLegacy使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ZLanguage
的用法示例。
在下文中一共展示了ZLanguage::getLanguageCodeLegacy方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: smarty_function_usergetlang
/**
* Smarty function to get the users language
*
* This function determines the recent users language
*
* Available parameters:
* - assign: If set, the result is assigned to the corresponding variable instead of printed out
*
* Example
* {usergetlang name="foobar"}
*
* @param array $params All attributes passed to this function from the template
* @param object $smarty Reference to the Smarty object
* @param string $assign (optional) The name of the variable to assign the result to
* @return string The recent users language
*/
function smarty_function_usergetlang($params, $smarty)
{
LogUtil::log(__f('Warning! Template plugin {%1$s} is deprecated, please use {%2$s} instead.', array('usergetlang', 'lang')), E_USER_DEPRECATED);
$assign = isset($params['assign']) ? $params['assign'] : null;
$result = ZLanguage::getLanguageCodeLegacy();
if ($assign) {
$smarty->assign($assign, $result);
return;
}
return $result;
}
示例2: pnUserGetLang
/**
* get the user's language
*
* This function returns the deprecated 3 digit language codes, you need to switch APIs
*
* @deprecated
* @see ZLanguage::getLanguageCode()
*
* @return string the name of the user's language
*/
function pnUserGetLang()
{
LogUtil::log(__f('Warning! Function %1$s is deprecated. Please use %2$s instead.', array(__FUNCTION__, 'ZLanguage::getLanguageCode()')), E_USER_DEPRECATED);
return ZLanguage::getLanguageCodeLegacy();
}
示例3: install
/**
* Initialise the settings module.
*
* @return boolean
*/
public function install()
{
// Set up an initial value for a module variable. Note that all module
// variables should be initialised with some value in this way rather
// than just left blank, this helps the user-side code and means that
// there doesn't need to be a check to see if the variable is set in
// the rest of the code as it always will be
System::setVar('debug', '0');
System::setVar('sitename', $this->__('Site name'));
System::setVar('slogan', $this->__('Site description'));
System::setVar('metakeywords', $this->__('zikula, portal, portal web, open source, web site, website, weblog, blog, content management, content management system, web content management, web content management system, enterprise web content management, cms, application framework'));
System::setVar('defaultpagetitle', $this->__('Site name'));
System::setVar('defaultmetadescription', $this->__('Site description'));
System::setVar('startdate', date('m/Y', time()));
System::setVar('adminmail', 'example@example.com');
System::setVar('Default_Theme', 'Andreas08');
System::setVar('timezone_offset', '0');
System::setVar('timezone_server', '0');
System::setVar('funtext', '1');
System::setVar('reportlevel', '0');
System::setVar('startpage', '');
System::setVar('Version_Num', Zikula_Core::VERSION_NUM);
System::setVar('Version_ID', Zikula_Core::VERSION_ID);
System::setVar('Version_Sub', Zikula_Core::VERSION_SUB);
System::setVar('debug_sql', '0');
System::setVar('multilingual', '1');
System::setVar('useflags', '0');
System::setVar('theme_change', '0');
System::setVar('UseCompression', '0');
System::setVar('siteoff', 0);
System::setVar('siteoffreason', '');
System::setVar('starttype', '');
System::setVar('startfunc', '');
System::setVar('startargs', '');
System::setVar('entrypoint', 'index.php');
System::setVar('language_detect', 0);
System::setVar('shorturls', false);
System::setVar('shorturlstype', '0');
System::setVar('shorturlsseparator', '-');
System::setVar('shorturlsstripentrypoint', false);
System::setVar('shorturlsdefaultmodule', '');
System::setVar('profilemodule', ModUtil::available('Profile') ? 'Profile' : '');
System::setVar('messagemodule', '');
System::setVar('languageurl', 0);
System::setVar('ajaxtimeout', 5000);
//! this is a comma-separated list of special characters to search for in permalinks
System::setVar('permasearch', $this->__('À,Á,Â,Ã,Å,à,á,â,ã,å,Ò,Ó,Ô,Õ,Ø,ò,ó,ô,õ,ø,È,É,Ê,Ë,è,é,ê,ë,Ç,ç,Ì,Í,Î,Ï,ì,í,î,ï,Ù,Ú,Û,ù,ú,û,ÿ,Ñ,ñ,ß,ä,Ä,ö,Ö,ü,Ü'));
//! this is a comma-separated list of special characters to replace in permalinks
System::setVar('permareplace', $this->__('A,A,A,A,A,a,a,a,a,a,O,O,O,O,O,o,o,o,o,o,E,E,E,E,e,e,e,e,C,c,I,I,I,I,i,i,i,i,U,U,U,u,u,u,y,N,n,ss,ae,Ae,oe,Oe,ue,Ue'));
System::setVar('language',ZLanguage::getLanguageCodeLegacy());
System::setVar('locale', ZLanguage::getLocale());
System::setVar('language_i18n', ZLanguage::getlanguageCode());
System::setVar('idnnames', 1);
if (!DBUtil::createTable('workflows')) {
return false;
}
if (!DBUtil::createTable('objectdata_attributes')) {
return false;
}
if (!DBUtil::createTable('objectdata_log')) {
return false;
}
if (!DBUtil::createTable('objectdata_meta')) {
return false;
}
// Initialisation successful
return true;
}
示例4: getPNlanguage
function getPNlanguage()
{
BlockUtil::load('Core', 'thelang');
// All entries use ISO 639-2/T
$lang['ara'] = "Arabic";
$lang['alb'] = "Albanian";
$lang['bul'] = "Bulgarian";
$lang['zho'] = "Chinese";
$lang['cat'] = "Catalan";
$lang['ces'] = "Czech";
$lang['hrv'] = "Croatian HRV";
$lang['cro'] = "Croatian CRO";
$lang['dan'] = "Danish";
$lang['nld'] = "Dutch";
$lang['eng'] = "English";
$lang['epo'] = "Esperanto";
$lang['est'] = "Estonian";
$lang['fin'] = "Finnish";
$lang['fra'] = "French";
$lang['deu'] = "German";
$lang['ell'] = "Greek";
$lang['heb'] = "Hebrew";
$lang['hun'] = "Hungarian";
$lang['isl'] = "Icelandic";
$lang['ind'] = "Indonesian";
$lang['ita'] = "Italian";
$lang['jpn'] = "Japanese";
$lang['kor'] = "Korean";
$lang['lav'] = "Latvian";
$lang['lit'] = "Lithuanian";
$lang['mas'] = "Malay";
$lang['mkd'] = "Macedonian";
$lang['nor'] = "Norwegian";
$lang['pol'] = "Polish";
$lang['por'] = "Portuguese";
$lang['ron'] = "Romanian";
$lang['rus'] = "Russian";
$lang['slv'] = "Slovenian";
$lang['spa'] = "Spanish";
$lang['swe'] = "Swedish";
$lang['tha'] = "Thai";
$lang['tur'] = "Turkish";
$lang['ukr'] = "Ukrainian";
$lang['yid'] = "Yiddish";
// ZphpBB2
//return strtolower($lang[SessionUtil::getVar('lang')]);
return strtolower($lang[ZLanguage::getLanguageCodeLegacy()]);
}