avrei bisogno di trovare una guida passo-passo per far diventare la mia applicazione bilingue (EN ed IT) utilizzando CGettextMessageSource; mi consigliate qualche link utile?
Non disdegno nemmeno un'estensione

Crisz
Posted 14 June 2013 - 03:33 AM
Posted 14 June 2013 - 04:34 AM
function __($string, $params = array(), $category = "") { return Yii::t($category, $string, $params); }
require_once(dirname(__FILE__) . '/../includes/localization.php');
'messages' => array( 'class' => 'CGettextMessageSource', 'useMoFile' => false, ),
Yii::app()->language = 'it_IT';
$this->pageTitle=Yii::app()->name .' - '. __("Contact Us"); echo __("If you have business inquiries or other questions, please fill out the following form to contact us. Thank you."); echo __("Fields with * are required");
<div class="row"> <?php echo $form->labelEx($model,__('name')); ?> <?php echo $form->textField($model,__('name'), array('required'=>'required')); ?> <?php echo $form->error($model,__('name')); ?> </div>
Posted 14 June 2013 - 05:29 AM
crisz, on 14 June 2013 - 04:34 AM, said:
<?php echo $form->labelEx($model,'name', array('attributeName' => __('name'))); ?> <?php echo $form->textField($model,'name', array('required'=>'required')); ?> <?php echo $form->error($model,'name'); ?>