加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 站长学院 > PHP教程 > 正文

php – Yii2生成翻译消息

发布时间:2020-12-13 16:33:00 所属栏目:PHP教程 来源:网络整理
导读:在Yii 1.x中,我们用命令生成翻译消息 ./framework/yiic message protected / messages / config.php 我们如何与Yii2达成一致? 只需运行yiic文件在您的项目的根目录(composer.json). 这是从yiic的帮助. 如果你有具体的问题让我知道. ./yii help message DESC
在Yii 1.x中,我们用命令生成翻译消息
./framework/yiic message protected / messages / config.php
我们如何与Yii2达成一致?
只需运行yiic文件在您的项目的根目录(composer.json).
这是从yiic的帮助.
如果你有具体的问题让我知道.

./yii help message

DESCRIPTION

Extracts messages to be translated from source files.

The extracted messages can be saved the following depending on format
setting in config file:

  • PHP message source files.
  • “.po” files.
  • Database.

Usage:
1. Create a configuration file using the ‘message/config’ command: yii message/config /path/to/myapp/messages/config.php
2. Edit the created config file,adjusting it for your web application needs.
3. Run the ‘message/extract’ command,using created config: yii message /path/to/myapp/messages/config.php

SUB-COMMANDS

  • message/config: Creates a configuration file for the “extract” command.
  • message/extract (default): Extracts messages to be translated from source c…

To see the detailed information about individual sub-commands,enter:

yii help

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读