修改CRUD的模板中的英文变中文步骤:
打开目录 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";
'$label'=>array('index'),
'Manage',
);\n";
修改为:
echo "\$this->breadcrumbs=array(
'$label'=>array('index'),
'管理',
);\n";
'$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')),
);
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')),
);
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><</b>, <b><=</b>, <b>></b>, <b>>=</b>, <b><></b>
or <b>=</b>) at the beginning of each of your search values to specify how the comparison should be done.
</p>
You may optionally enter a comparison operator (<b><</b>, <b><=</b>, <b>></b>, <b>>=</b>, <b><></b>
or <b>=</b>) at the beginning of each of your search values to specify how the comparison should be done.
</p>
修改为:
<p>
你可以输入一个比较运算符 (<b><</b>, <b><=</b>, <b>></b>, <b>>=</b>, <b><></b>
或者 <b>=</b>) 在你要进行比较搜索的值之前.
</p>
你可以输入一个比较运算符 (<b><</b>, <b><=</b>, <b>></b>, <b>>=</b>, <b><></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";
'$label'=>array('index'),
'Create',
);\n";
修改为:
echo "\$this->breadcrumbs=array(
'$label'=>array('index'),
'新增',
);\n";
'$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')),
);
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')),
);
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'=>'Manage <?php echo $this->modelClass; ?>', 'url'=>array('admin')),
修改为:
array('label'=>'新增<?php echo $this->modelClass; ?>', 'url'=>array('create')),
array('label'=>'管理 <?php echo $this->modelClass; ?>', 'url'=>array('admin')),
array('label'=>'管理 <?php echo $this->modelClass; ?>', 'url'=>array('admin')),
修改update.php
找到:
echo "\$this->breadcrumbs=array(
'$label'=>array('index'),
\$model->{$nameColumn}=>array('view','id'=>\$model->{$this->tableSchema->primaryKey}),
'Update',
);\n";
'$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";
'$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'=>'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'=>'管理 <?php echo $this->modelClass; ?>', 'url'=>array('admin')),
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'=>'管理 <?php echo $this->modelClass; ?>', 'url'=>array('admin')),
找到:
<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')),
);
?>
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')),
);
?>
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',
));
'title'=>'Operations',
));
修改为:
$this->beginWidget('zii.widgets.CPortlet', array(
'title'=>'操作',
));
'title'=>'操作',
));
相关推荐
Yii2 Gii 代码生成器,可轻松创建基本的新表迁移。 安装 安装此扩展的首选方法是通过 。 "wilwade/gii-migration": "dev-master" 用法 //if your gii modules configuration looks like below: $ config [ '...
主要介绍了Yii 框架使用Gii生成代码操作,结合实例形式F分析了Yii 使用Gii生成代码基本操作步骤与相关注意事项,需要的朋友可以参考下
yii2-enhanced-gii Yii2 Gii(发电机)与关系 支持 在LinkedIn上支持我 安装 安装此扩展的首选方法是通过 。 无论运行 $ composer require mootensai/yii2-enhanced-gii:dev-master $ composer require kartik-v/...
yii2-ajaxcrud, 用于yii2的单一页面Ajax管理的Gii模板 yii2-ajaxcrud 用于yii2的单一页面Ajax管理的Gii模板 特性使用Ajax创建。读取。更新。删除页面批量删除 suportPjax小部件 suport导出函数( pdf,html,文本,cs
yii框架中文手册教程和YII模板 我很辛苦才找到的
Yii2框架代码生成器扩展Gii for AdminLTE模板 安装 该软件包由。 如果要手动安装,请打开终端并运行: php composer.phar require " mervick/yii2-adminlte-gii " " * " 或添加到composer.json " require " : {...
yii1.1中文文档 yii框架中文手册教程.pdf
已定稿 用 Gii 生成代码 已定稿 更上一层楼 应用结构 已定稿 结构概述 已定稿 入口脚本 已定稿 应用 已定稿 应用组件 已定稿 控制器(Controller) 已定稿 视图(View) 已定稿 模型(Model) 已定稿 过滤器 已定稿 ...
Gii Extension for Yii 2 此扩展为应用程序提供了一个基于Web的代码生成器,称为Gii。 您可以使用Gii快速生成模型,表单,模块,CRUD等。 有关许可证信息,请检查文件。 文档位于 。 安装 安装此扩展的首选方法是...
名字 Yii (读作 `易`)在中文里有 “极致简单与不断演变” 两重含义,也可看作 **Yes It Is**! 的缩写。 Yii 最适合做什么? Yii 是一个通用的 Web 编程框架,即可以用于开发各种基于 PHP 的 Web 应用。因为基于...
Laravel开发-yii2-giiall 使用yii2 gii为其他PHP框架生成代码,如phalconeye、laravel等。
主要介绍了Yii 访问 Gii(脚手架)时出现 403 错误的解决方法的相关资料,需要的朋友可以参考下
yii2.0基础和高级应用程序模板两个,不想使用composer安装yii2.0的,就直接下载这个用吧
yii2-gii-adminlte yii2 框架生成器代码,带有布局模板 adminlte 和基于 kartik dynagrid 通过作曲家添加: "sintret/yii2-gii-adminlte": "dev-master" 在您的配置中设置如下: $config['modules']['gii'] = [ '...
yii framework框架 + yii app模板(基本、高级)
yii2.0高级应用程序模板,不想使用composer安装yii2.0的,就直接下载这个用吧
yii简易后台基础模板
Yii2.0中文学习手册