[ Index ] |
|
Code source de PRADO 3.0.6 |
1 <?php 2 3 class Home extends TPage 4 { 5 /** 6 * Change the globalization culture using value from request "lang" parameter. 7 */ 8 public function __construct() 9 { 10 parent::__construct(); 11 $lang = $this->Request['lang']; 12 if(CultureInfo::validCulture($lang)) //only valid lang is permitted 13 $this->getApplication()->getGlobalization()->setCulture($lang); 14 } 15 16 /** 17 * Initialize the page with some arbituary data. 18 * @param TEventParameter event parameter. 19 */ 20 public function onLoad($param) 21 { 22 parent::onLoad($param); 23 $time1 = $this->Time1; 24 $time1->Value = time(); 25 26 $number2 = $this->Number2; 27 $number2->Value = 46412.416; 28 29 $this->dataBind(); 30 } 31 32 /** 33 * Get the localized current culture name. 34 * @return string localized curreny culture name. 35 */ 36 public function getCurrentCulture() 37 { 38 $culture = $this->getApplication()->getGlobalization()->getCulture(); 39 $cultureInfo = new CultureInfo($culture); 40 return $cultureInfo->getNativeName(); 41 } 42 } 43 44 ?>
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 |