Yii2 message issue (can not find message key)

hi all,

i try to add message in directory:




- messages

-- en-US

----> app.php



app.php




<?php

return [

    'select_promp'  => '--- Please select ---'

];



but when i call it select_prom not translate text:




Yii::t('app', 'select_promp')



the result:




"select_promp" should be "--- Please select ---"



this my configuration in main config:




'i18n' => [

    'translations' => [

        'app*' => [

            'class' => 'yii\i18n\PhpMessageSource',

            'basePath' => '@app/messages',

            'sourceLanguage' => 'en-US',

            'fileMap' => [

                'app' => 'app.php',

                'app/error' => 'error.php',

            ],

        ],

    ],

],



Your source and target language seem to be the same. By default, Yii won’t translate in that case.

See http://www.yiiframework.com/doc-2.0/yii-i18n-messagesource.html#$forceTranslation-detail

aha thank you :) it worked !!