Source for file LTranslate.php
Documentation is available at LTranslate.php
* @license http://opensource.org/licenses/mozilla1.1.php Mozilla Public License
* @copyright 2005, diemeisterei GmbH. All rights reserved.
* @author $Author: schmunk $
* @version $Revision: 601 $ $Date: 2007-02-24 23:49:30 +0100 (Sat, 24 Feb 2007) $
* @package Phundament.Components
* Extended TTranslate control, with uc_first
$this->setViewstate("Ucfirst", TPropertyValue :: ensureBoolean($value));
* @return Wheter use uc_first with input string, default is false
return $this->getViewstate("Ucfirst", false);
public function render($writer)
$textWriter= new TTextWriter;
$htmlWriter= new THtmlWriter($textWriter);
foreach($this->getControls() as $control)
if($control instanceof TTranslateParameter)
$subs['{'. $control->getKey(). '}'] = $control->getParameter();
elseif($control instanceof TControl)
$control->render($htmlWriter);
$textWriter->write($control);
$text = $this->getText();
$text = $textWriter->flush();
$text = ucfirst($this->translateText($text, $subs));
$text = $this->translateText($text, $subs);
|