console\controllers\MessageController actionExtract()

actionExtract() public method Extracts messages to be translated from source code. This command will search through source code files and extract messages that need to be translated in different languages. public void actionExtract ( $configFile = null )$configFile string The path or alias of the configuration file. You may use the "yii message/config" command to generate this file and then customize it for your needs. throws yii\console\Exception on failure.

console\controllers\MessageController actionConfig()

actionConfig() public method Creates a configuration file for the "extract" command using command line options specified The generated configuration file contains parameters required for source code messages extraction. You may use this configuration file with the "extract" command. public integer actionConfig ( $filePath )$filePath string Output file name or alias. return integer CLI exit code throws yii\console\Exception on failure.

console\controllers\MessageController $sourceMessageTable

$sourceMessageTable public property Custom name for source message table for "db" format. public string $sourceMessageTable = '{{%source_message}}'

console\controllers\MessageController $translator

$translator public property The name of the function for translating messages. Defaults to 'Yii::t'. This is used as a mark to find the messages to be translated. You may use a string for single function name or an array for multiple function names. public string $translator = 'Yii::t'

console\controllers\MessageController $sort

$sort public property Whether to sort messages by keys when merging new messages with the existing ones. Defaults to false, which means the new (untranslated) messages will be separated from the old (translated) ones. public boolean $sort = false

console\controllers\MessageController $removeUnused

$removeUnused public property Whether to remove messages that no longer appear in the source code. Defaults to false, which means these messages will NOT be removed. public boolean $removeUnused = false

console\controllers\MessageController $sourcePath

$sourcePath public property Required, root directory of all source files. public string $sourcePath = '@yii'

console\controllers\MessageController $only

$only public property List of patterns that specify which files (not directories) should be processed. If empty or not set, all files will be processed. See helpers/FileHelper::findFiles() description for pattern matching rules. If a file/directory matches both a pattern in "only" and "except", it will NOT be processed. public array $only = ['*.php']

console\controllers\MessageController $messageTable

$messageTable public property Custom name for translation message table for "db" format. public string $messageTable = '{{%message}}'

console\controllers\MessageController $overwrite

$overwrite public property Whether the message file should be overwritten with the merged messages public boolean $overwrite = true