打开目录 framework\gii\generators\crud\templates\default



修改_form.php



找到:



<p class="note">Fields with <span class="required">*</span> are required.</p>



修改为:



<p>字段带<span class="required">*</span> 的为必填项.</p>



 



找到:



          <?php echo "<?php echo CHtml::submitButton(\$model->isNewRecord ? 'Create' : 'Save'); ?>\n"; ?>



修改为:



          <?php echo "<?php echo CHtml::submitButton(\$model->isNewRecord ? '新增' : '更新'); ?>\n"; ?>



 



修改_search.php



找到:          



          <?php echo "<?php echo CHtml::submitButton('Search'); ?>\n"; ?>



修改为:



          <?php echo "<?php echo CHtml::submitButton('搜索'); ?>\n"; ?>



 



修改admin.php



找到:



echo "\$this->breadcrumbs=array(
     '$label'=>array('index'),
     'Manage',
);\n";



修改为:



echo "\$this->breadcrumbs=array(
     '$label'=>array('index'),
     '管理',
);\n";



 



找到:



$this->menu=array(
     array('label'=>'List <?php echo $this->modelClass; ?>', 'url'=>array('index')),
     array('label'=>'Create <?php echo $this->modelClass; ?>', 'url'=>array('create')),
);



修改为:



$this->menu=array(
     array('label'=>'列表 <?php echo $this->modelClass; ?>', 'url'=>array('index')),
     array('label'=>'新增 <?php echo $this->modelClass; ?>', 'url'=>array('create')),
);



 



找到:



<h1>Manage <?php echo $this->pluralize($this->class2name($this->modelClass)); ?></h1>



修改为



<h1>管理<?php echo $this->pluralize($this->class2name($this->modelClass)); ?></h1>



 



找到:



<p>
You may optionally enter a comparison operator (<b>&lt;</b>, <b>&lt;=</b>, <b>&gt;</b>, <b>&gt;=</b>, <b>&lt;&gt;</b>
or <b>=</b>) at the beginning of each of your search values to specify how the comparison should be done.
</p>



修改为:



<p>
你可以输入一个比较运算符 (<b>&lt;</b>, <b>&lt;=</b>, <b>&gt;</b>, <b>&gt;=</b>, <b>&lt;&gt;</b>
或者 <b>=</b>) 在你要进行比较搜索的值之前.
</p>



 



找到:



<?php echo "<?php echo CHtml::link('Advanced Search','#',array('class'=>'search-button')); ?>"; ?>



修改为:



<?php echo "<?php echo CHtml::link('高级搜索','#',array('class'=>'search-button')); ?>"; ?>



 



修改create.php



找到:



echo "\$this->breadcrumbs=array(
     '$label'=>array('index'),
     'Create',
);\n";



修改为:



echo "\$this->breadcrumbs=array(
     '$label'=>array('index'),
     '新增',
);\n";



 



找到:



$this->menu=array(
     array('label'=>'List <?php echo $this->modelClass; ?>', 'url'=>array('index')),
     array('label'=>'Manage <?php echo $this->modelClass; ?>', 'url'=>array('admin')),
);



 



修改为:



$this->menu=array(
     array('label'=>'列表 <?php echo $this->modelClass; ?>', 'url'=>array('index')),
     array('label'=>'管理e<?php echo $this->modelClass; ?>', 'url'=>array('admin')),
);



 



找到:



<h1>Create <?php echo $this->modelClass; ?></h1>



修改为:



<h1>新增 <?php echo $this->modelClass; ?></h1>



 



修改index.php



找到:



array('label'=>'Create <?php echo $this->modelClass; ?>', 'url'=>array('create')),
     array('label'=>'Manage <?php echo $this->modelClass; ?>', 'url'=>array('admin')),



修改为:



array('label'=>'新增<?php echo $this->modelClass; ?>', 'url'=>array('create')),
     array('label'=>' 管理



 



修改update.php



找到:



echo "\$this->breadcrumbs=array(
     '$label'=>array('index'),
     \$model->{$nameColumn}=>array('view','id'=>\$model->{$this->tableSchema->primaryKey}),
     'Update',
);\n";



修改为:



echo "\$this->breadcrumbs=array(
     '$label'=>array('index'),
     \$model->{$nameColumn}=>array('view','id'=>\$model->{$this->tableSchema->primaryKey}),
     '更新',
);\n";



 



找到:



array('label'=>'List <?php echo $this->modelClass; ?>', 'url'=>array('index')),
     array('label'=>'Create <?php echo $this->modelClass; ?>', 'url'=>array('create')),
     array('label'=>'View <?php echo $this->modelClass; ?>', 'url'=>array('view', 'id'=>$model-><?php echo $this->tableSchema->primaryKey; ?>)),
     array('label'=>'Manage <?php echo $this->modelClass; ?>', 'url'=>array('admin')),



修改为:



array('label'=>'列表<?php echo $this->modelClass; ?>', 'url'=>array('index')),
     array('label'=>'新增 <?php echo $this->modelClass; ?>', 'url'=>array('create')),
     array('label'=>'查看<?php echo $this->modelClass; ?>', 'url'=>array('view', 'id'=>$model-><?php echo $this->tableSchema->primaryKey; ?>)),
     array('label'=>' 管理



 



找到:



<h1>Update <?php echo $this->modelClass." <?php echo \$model->{$this->tableSchema->primaryKey}; ?>"; ?></h1>



修改为:



<h1>更新 <?php echo $this->modelClass." <?php echo \$model->{$this->tableSchema->primaryKey}; ?>"; ?></h1>



 



修改view.php



找到:



<h1>View <?php echo $this->modelClass." #<?php echo \$model->{$this->tableSchema->primaryKey}; ?>"; ?></h1>



修改为:



<h1>查看 <?php echo $this->modelClass." #<?php echo \$model->{$this->tableSchema->primaryKey}; ?>"; ?></h1>



 



找到:


$this->menu=array(

array('label'=>'List <?php echo $this->modelClass; ?>', 'url'=>array('index')),

array('label'=>'Create <?php echo $this->modelClass; ?>', 'url'=>array('create')),

array('label'=>'Update <?php echo $this->modelClass; ?>', 'url'=>array('update', 'id'=>$model-><?php echo $this->tableSchema->primaryKey; ?>)),

array('label'=>'Delete <?php echo $this->modelClass; ?>', 'url'=>'#', 'linkOptions'=>array('submit'=>array('delete','id'=>$model-><?php echo $this->tableSchema->primaryKey; ?>),'confirm'=>'Are you sure you want to delete this item?')),

array('label'=>'Manage <?php echo $this->modelClass; ?>', 'url'=>array('admin')),

);

?>



修改为:




$this->menu=array(

array('label'=>'列表<?php echo $this->modelClass; ?>', 'url'=>array('index')),

array('label'=>'新增<?php echo $this->modelClass; ?>', 'url'=>array('create')),

array('label'=>'更新<?php echo $this->modelClass; ?>', 'url'=>array('update', 'id'=>$model-><?php echo $this->tableSchema->primaryKey; ?>)),

array('label'=>'删除<?php echo $this->modelClass; ?>', 'url'=>'#', 'linkOptions'=>array('submit'=>array('delete','id'=>$model-><?php echo $this->tableSchema->primaryKey; ?>),'confirm'=>'Are you sure you want to delete this item?')),

array('label'=>'
管理 <?php echo $this->modelClass; ?>', 'url'=>array('admin')),

);

?>








打开 \protected\views\layouts\column2.php




找到:




$this->beginWidget('zii.widgets.CPortlet', array(

'title'=>'Operations',

));



修改为:


$this->beginWidget('zii.widgets.CPortlet', array(
               'title'=>'操作',
          ));