php – Yii2生成翻译消息

前端之家收集整理的这篇文章主要介绍了php – Yii2生成翻译消息前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
在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

猜你在找的PHP相关文章