2013-12-19 61 views
1

我使用的yiic消息,產生TRADUCTION有一個錯誤:配置文件生成Yii的翻譯消息文件

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配置的東西,但我不知道......

配置/ console.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

,但我沒有得到它!謝謝你的幫助 !

+0

請確保您有保留的配置文件作爲保護/配置/ console.php如果不配置配置文件保護/ yiic.php –

+0

你是如何執行的?它應該是yiic消息路徑/ to/config/file? – dev1234

回答

3

我不得不寫的yiic消息消息/ config.php文件到的明顯的配置整合......對不起,我不能用它來在cmd

上保護文件夾中右擊打開控制檯

和類型:

yiic message message/config.php