Yii Framework Forum: Messages Custom "missingtranslation" Handling - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Messages Custom "missingtranslation" Handling Rate Topic: -----

#1 User is offline   Kboy 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 13-January 13

Posted 04 June 2013 - 04:17 AM

When missing translation occur, I want to insert the missed message into the table. But I don't know how to pass the values to the handler.

in main.php
...
'messages' => array(
    'class' => 'CDbMessageSource',
    'onMissingTranslation' => array('Translation', 'missingHandler'),
),
...


Translation.php
class Translation{

    //here I want to pass the $category and $message from Yii::t($category, $message), I need to insert into the table.
    public static function missingHandler(){
        
    }
}


I want to know how to pass value to the Translation class.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users