当前位置: 首页>>代码示例>>PHP>>正文


PHP ext_Lang::detect_lang方法代码示例

本文整理汇总了PHP中ext_Lang::detect_lang方法的典型用法代码示例。如果您正苦于以下问题:PHP ext_Lang::detect_lang方法的具体用法?PHP ext_Lang::detect_lang怎么用?PHP ext_Lang::detect_lang使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ext_Lang的用法示例。


在下文中一共展示了ext_Lang::detect_lang方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: onShowLoginForm


//.........这里部分代码省略.........
			name: "password",
                        value: "<?php 
        echo $Pass;
        ?>
",
			inputType: "password",
			width:175,
			allowBlank:false
		}, new Ext.form.ComboBox({
			
			fieldLabel: "<?php 
        echo ext_Lang::msg('misclang', true);
        ?>
",
			store: new Ext.data.SimpleStore({
		fields: ['language', 'langname'],
		data :	[
		<?php 
        $langs = get_languages();
        $i = 0;
        $c = count($langs);
        foreach ($langs as $language => $name) {
            echo "['{$language}', '{$name}' ]";
            if (++$i < $c) {
                echo ',';
            }
        }
        ?>
			]
	}),
			displayField:"langname",
			valueField: "language",
			value: "<?php 
        echo ext_Lang::detect_lang();
        ?>
",
			hiddenName: "lang",
			disableKeyFilter: true,
			editable: false,
			triggerAction: "all",
			mode: "local",
			allowBlank: false,
			selectOnFocus:true
		}),
		{
			xtype: "displayfield",
			id: "statusBar"
		}
		],
		buttons: [{
			text: "<?php 
        echo ext_Lang::msg('btnlogin', true);
        ?>
", 
			type: "submit",
			handler: function() {
				Ext.get( "statusBar").update( "Please wait..." );
				Ext.getCmp("simpleform").getForm().submit({
					reset: false,
					success: function(form, action) { location.reload() },
					failure: function(form, action) {
						if( !action.result ) return;
						Ext.Msg.alert('<?php 
        echo ext_Lang::err('error', true);
        ?>
', action.result.error, function() {
开发者ID:jramsey08,项目名称:Coldwebs-V2.0,代码行数:67,代码来源:extplorer.php

示例2: define

define("_EXT_PATH", realpath(dirname(__FILE__) . '/../../administrator/components/com_extplorer'));
define("_EXT_URL", $mosConfig_live_site . "/administrator/components/com_extplorer");
require _EXT_PATH . "/application.php";
require _EXT_PATH . "/libraries/File_Operations.php";
require _EXT_PATH . "/include/functions.php";
require _EXT_PATH . "/include/header.php";
require _EXT_PATH . "/include/result.class.php";
if (!class_exists('InputFilter')) {
    require_once _EXT_PATH . '/libraries/inputfilter.php';
}
$GLOBALS['ERROR'] = '';
$GLOBALS['__GET'] =& $_GET;
$GLOBALS['__POST'] =& $_POST;
$GLOBALS['__SERVER'] =& $_SERVER;
$GLOBALS['__FILES'] =& $_FILES;
$default_lang = !empty($GLOBALS['mosConfig_lang']) ? $GLOBALS['mosConfig_lang'] : ext_Lang::detect_lang();
echo $default_lang;
if (file_exists(_EXT_PATH . "/languages/{$default_lang}.php")) {
    require _EXT_PATH . "/languages/{$default_lang}.php";
} else {
    require _EXT_PATH . "/languages/english.php";
}
if (file_exists(_EXT_PATH . "/languages/" . $default_lang . "_mimes.php")) {
    require _EXT_PATH . "/languages/" . $default_lang . "_mimes.php";
} else {
    require _EXT_PATH . "/languages/english_mimes.php";
}
require _EXT_PATH . "/config/mimes.php";
// the filename of the QuiXplorer script: (you rarely need to change this)
if ($_SERVER['SERVER_PORT'] == 443) {
    $GLOBALS["script_name"] = "https://" . $GLOBALS['__SERVER']['HTTP_HOST'] . $GLOBALS['__SERVER']["PHP_SELF"];
开发者ID:kostya1017,项目名称:our,代码行数:31,代码来源:extplorer.init.php

示例3: login


//.........这里部分代码省略.........
                echo "['{$language}', '{$name}' ]";
                if (++$i < $c) {
                    echo ',';
                }
            }
            ?>
	        ]
	});
	var simple = new Ext.form.Form({
	    labelWidth: 125, // label settings here cascade unless overridden
	    url:'<?php 
            echo basename($GLOBALS['script_name']);
            ?>
'
	});
	simple.add(
	    new Ext.form.TextField({
	        fieldLabel: '<?php 
            echo ext_Lang::msg('miscusername', true);
            ?>
',
	        name: 'p_user',
	        width:175,
	        allowBlank:false
	    }),
	    new Ext.form.TextField({
	        fieldLabel: '<?php 
            echo ext_Lang::msg('miscpassword', true);
            ?>
',
	        name: 'p_pass',
	        inputType: 'password',
	        width:175,
	        allowBlank:false
	    }),
		new Ext.form.ComboBox({
			fieldLabel: '<?php 
            echo ext_Lang::msg('misclang', true);
            ?>
',
		    store: languages,
		    displayField:'langname',
		    valueField: 'language',
		    value: '<?php 
            echo ext_Lang::detect_lang();
            ?>
',
		    hiddenName: 'lang',
		    disableKeyFilter: true,
		    editable: false,
		    triggerAction: 'all',
		    mode: 'local',
		    allowBlank: false,
		    selectOnFocus:true
		})
	);
	
	simple.addButton({text: '<?php 
            echo ext_Lang::msg('btnlogin', true);
            ?>
', type: 'submit'}, function() {
		Ext.get( 'statusBar').update( 'Please wait...' );
	    simple.submit({
	        //reset: true,
	        reset: false,
	        success: function(form, action) {	
	        	Ext.get( 'statusBar').update( action.result.message );
			location.href = '<?php 
            echo basename($GLOBALS['script_name']);
            ?>
?extplorer';
	        },
	        failure: function(form, action) {
	        	if( !action.result ) return;
				Ext.MessageBox.alert('Error!', action.result.error);
				Ext.get( 'statusBar').update( action.result.error );
				simple.findField( 'p_pass').setValue('');
				simple.findField( 'p_user').focus();
	        },
	        scope: simple,
	        // add some vars to the request, similar to hidden fields
	        params: {option: 'com_extplorer', 
	        		action: 'login'
	        }
	    })
	});
	simple.addButton('<?php 
            echo ext_Lang::msg('btnreset', true);
            ?>
', function() { simple.reset(); } );
	simple.render('adminForm');
	Ext.get( 'formContainer').center();
	Ext.get( 'formContainer').setTop(100);
	simple.findField('p_user').focus();

</script><?php 
            define('_LOGIN_REQUIRED', 1);
        }
    }
}
开发者ID:shamblett,项目名称:janitor,代码行数:101,代码来源:login.php


注:本文中的ext_Lang::detect_lang方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。