macagua / example-yii-mail

Automatically exported from code.google.com/p/yii-mail
BSD 3-Clause "New" or "Revised" License
0 stars 2 forks source link

Views doesn't support localizedViews #10

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What is the expected output? What do you see instead?

I have different view files 'views/mail/en/mail.php' and 
'views/mail/ru/mail.php'

Your extension doesn't use Yii's findLocalizedFile function, to get right view.

Original issue reported on code.google.com by ig...@kyra.fi on 17 Mar 2011 at 4:33

GoogleCodeExporter commented 9 years ago
I tested following change to YiiMailMessage.php and it seems to work just fine.

142c142,144
<           $viewPath = 
Yii::getPathOfAlias(Yii::app()->mail->viewPath.'.'.$this->view).'.php';
---
>           $viewPath = Yii::app()->findLocalizedFile(
>               Yii::getPathOfAlias(Yii::app()->mail->viewPath.'.'.$this->view).'.php'
>           );

I think its easier to understand CApplication::findLocalizedFile() from the 
source than from the documentation. 

Original comment by f...@thefsb.org on 12 Oct 2011 at 1:39

GoogleCodeExporter commented 9 years ago
I think Issue 13 is related to this: 
https://code.google.com/p/yii-mail/issues/detail?id=13

Original comment by i...@morphew.de on 23 Nov 2011 at 2:45