gpt4 book ai didi

php - Yii2 生成翻译信息

转载 作者:可可西里 更新时间:2023-10-31 22:44:30 27 4
gpt4 key购买 nike

在 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 - Yii2 生成翻译信息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26552462/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com