[ Index ] |
|
Code source de PRADO 3.0.6 |
1 <?php 2 /** 3 * TMultiView and TView class file. 4 * 5 * @author Wei Zhuo<weizhuo[at]gmail[dot]com> 6 * @link http://www.pradosoft.com/ 7 * @copyright Copyright © 2005 PradoSoft 8 * @license http://www.pradosoft.com/license/ 9 * @version $Revision: 1.66 $ $Date: ${DATE} ${TIME} $ 10 * @package System.I18N 11 */ 12 13 /** 14 * Import the HTTPNeogtiator 15 */ 16 Prado::using('System.I18N.core.HTTPNegotiator'); 17 18 /** 19 * TGlobalizationAutoDetect class will automatically try to resolve the default 20 * culture using the user browser language settings. 21 * 22 * @author Wei Zhuo<weizhuo[at]gmail[dot]com> 23 * @version $Revision: 1.66 $ $Date: ${DATE} ${TIME} $ 24 * @package System.I18N 25 */ 26 class TGlobalizationAutoDetect extends TGlobalization 27 { 28 public function init($xml) 29 { 30 parent::init($xml); 31 32 //set the culture according to browser language settings 33 $http = new HTTPNegotiator(); 34 $languages = $http->getLanguages(); 35 if(count($languages) > 0) 36 $this->setCulture($languages[0]); 37 } 38 } 39 40 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sun Feb 25 21:07:04 2007 | par Balluche grâce à PHPXref 0.7 |