config files to Generate Yii translation message files

2.5k views Asked by At

i have an error using Yiic message to generate traduction:

Error:the configuration file is not specified

i have a config file /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',
        ),
);

i may have to configure something in the config/main.php or in console.php but i have no idea what...

config/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,
        ),

    ),
);

i can't found anything in the doc: http://www.yiiframework.com/doc/guide/1.1/fr/topics.i18n

but i didn't get it ! thanks for your help !

1

There are 1 answers

0
user2869049 On BEST ANSWER

i have to write yiic message message/config.php to integrate the config that's was obvious... sorry i'm not use to cmd

open the console by right click on protected folder

and type :

yiic message message/config.php