{"action":"created","issue":{"url":"https://api.github.com/repos/yiisoft/yii2/issues/8131","labels_url":"https://api.github.com/repos/yiisoft/yii2/issues/8131/labels{/name}","comments_url":"https://api.github.com/repos/yiisoft/yii2/issues/8131/comments","events_url":"https://api.github.com/repos/yiisoft/yii2/issues/8131/events","html_url":"https://github.com/yiisoft/yii2/issues/8131","id":69447361,"number":8131,"title":"Breadcrumbs don't find message category 'yii'.","user":{"login":"twinni","id":5811414,"avatar_url":"https://avatars.githubusercontent.com/u/5811414?v=3","gravatar_id":"","url":"https://api.github.com/users/twinni","html_url":"https://github.com/twinni","followers_url":"https://api.github.com/users/twinni/followers","following_url":"https://api.github.com/users/twinni/following{/other_user}","gists_url":"https://api.github.com/users/twinni/gists{/gist_id}","starred_url":"https://api.github.com/users/twinni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twinni/subscriptions","organizations_url":"https://api.github.com/users/twinni/orgs","repos_url":"https://api.github.com/users/twinni/repos","events_url":"https://api.github.com/users/twinni/events{/privacy}","received_events_url":"https://api.github.com/users/twinni/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-04-19T17:39:13Z","updated_at":"2015-04-19T17:48:54Z","closed_at":null,"body":"After changing the sourceLanguage and rendering a view the message file for category 'yii'  is not found. The log has following entry:\r\n```\r\nyii\\i18n\\PhpMessageSource::loadMessages\r\n```\r\n```\r\nThe message file for category 'yii' does not exist: D:\\WebRoot\\adv\\vendor\\yiisoft\\yii2/messages/en-En/yii.php Fallback file does not exist as well: D:\\WebRoot\\adv\\vendor\\yiisoft\\yii2/messages/en/yii.php\r\n```\r\nExample view:\r\n```php\r\n<?php\r\n$this->params['breadcrumbs'][] = 'Can not find message file';\r\n\r\n$oldSourceLanguage = Yii::$app->sourceLanguage;\r\necho  '<br>Yii::$app->sourceLanguage: ' . Yii::$app->sourceLanguage;  // en-US\r\n\r\nYii::$app->sourceLanguage = 'de-DE';\r\n \r\n$languages = [\r\n    'it-IT',\r\n    'it',\r\n    'de-DE',\r\n    'de',\r\n    'en-US',\r\n    'en-EN'     // only this one makes trouble \r\n];\r\n\r\nforeach ($languages as $lang) {\r\n    Yii::$app->language = $lang;\r\n    echo '<br>' . Yii::$app->language . ' = ' . Yii::t('app', 'Test');\r\n}\r\n// Yii::$app->language = $oldSourceLanguage;\r\n?>\r\n```\r\n\r\nThere are two things of special interest:\r\n1) The problem occurs only when ```Yii::$app->language``` is set to 'en-EN'. All other languages are ok.\r\n2) The problem doesn't occur when the default ```Yii::$app->language``` is set back before the main.php layout file is rendered. That's strange as I wouldn't expect breadcrumbs acessing message files."},"comment":{"url":"https://api.github.com/repos/yiisoft/yii2/issues/comments/94300927","html_url":"https://github.com/yiisoft/yii2/issues/8131#issuecomment-94300927","issue_url":"https://api.github.com/repos/yiisoft/yii2/issues/8131","id":94300927,"user":{"login":"cebe","id":189796,"avatar_url":"https://avatars.githubusercontent.com/u/189796?v=3","gravatar_id":"","url":"https://api.github.com/users/cebe","html_url":"https://github.com/cebe","followers_url":"https://api.github.com/users/cebe/followers","following_url":"https://api.github.com/users/cebe/following{/other_user}","gists_url":"https://api.github.com/users/cebe/gists{/gist_id}","starred_url":"https://api.github.com/users/cebe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cebe/subscriptions","organizations_url":"https://api.github.com/users/cebe/orgs","repos_url":"https://api.github.com/users/cebe/repos","events_url":"https://api.github.com/users/cebe/events{/privacy}","received_events_url":"https://api.github.com/users/cebe/received_events","type":"User","site_admin":false},"created_at":"2015-04-19T17:48:54Z","updated_at":"2015-04-19T17:48:54Z","body":"duplicate of #7964"}}