简体   繁体   中英

config files to Generate Yii translation message files

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 !

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM