1

我使用 Yiic 消息生成翻译时出错:

Error:the configuration file is not specified

我有一个配置文件 /protected/messages/config.php

<?php
/**
 * This is the configuration for generating message translations
 * for the Yii framework. It is used by the 'yiic message' command.
 */
return array(
        'sourcePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'../..',
        'messagePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'messages',
        'languages'=>array('de','it','fr'),
        'fileTypes'=>array('php'),
        'overwrite'=>true,
        'exclude'=>array(
                '.svn',
                'yiilite.php',
                'yiit.php',
                '/i18n/data',
                '/blog',
                '/web/js',
                '/protected/gii',
                '/protected/yii',
                '/protected/messages',
                '/protected/extensions/giix-core',
                '/images',
                '/media',
                '/assets',
                '/protected/assets',
                '/protected/vendors',
        ),
);

我可能需要在 config/main.php 或 console.php 中配置一些东西,但我不知道是什么......

配置/控制台.php

     <?php

// This is the configuration for yiic console application.
// Any writable CConsoleApplication properties can be configured here.
return array(
    'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..',
    'name'=>'My Console Application',
    // application components
    'components'=>array(
        'db'=>array(
            'connectionString' => 'mysql:host=localhost;dbname=lygnes',
            'emulatePrepare' => true,
            'username' => 'XXX',
            'password' => 'XXX',
            'charset' => 'utf8',
            'enableProfiling' => true,
            'enableParamLogging' => true,
        ),

    ),
);

我在文档中找不到任何内容:http ://www.yiiframework.com/doc/guide/1.1/fr/topics.i18n

但我没明白!感谢您的帮助 !

4

1 回答 1

3

我必须编写 yiic 消息 message/config.php 来集成显而易见的配置......对不起,我不习惯 cmd

右键单击受保护的文件夹打开控制台

并输入:

yiic message message/config.php
于 2013-12-20T13:04:24.210 回答