MissingTranslationEvent.php 1.02 KB
Newer Older
Qiang Xue committed
1 2 3
<?php
/**
 * @link http://www.yiiframework.com/
Qiang Xue committed
4
 * @copyright Copyright (c) 2008 Yii Software LLC
Qiang Xue committed
5 6 7 8 9 10 11 12
 * @license http://www.yiiframework.com/license/
 */

namespace yii\i18n;

use yii\base\Event;

/**
Qiang Xue committed
13
 * MissingTranslationEvent represents the parameter for the [[MessageSource::EVENT_MISSING_TRANSLATION]] event.
Qiang Xue committed
14 15 16 17 18 19 20
 *
 * @author Qiang Xue <qiang.xue@gmail.com>
 * @since 2.0
 */
class MissingTranslationEvent extends Event
{
	/**
21 22
	 * @var string the message to be translated. An event handler may use this to provide a fallback translation
	 * and set [[translatedMessage]] if possible.
Qiang Xue committed
23 24
	 */
	public $message;
25
	/**
Qiang Xue committed
26 27
	 * @var string the translated message. An event handler may overwrite this property
	 * with a translated version of [[message]] if possible. If not set (null), it means the message is not translated.
28
	 */
Qiang Xue committed
29
	public $translatedMessage;
Qiang Xue committed
30 31 32 33 34
	/**
	 * @var string the category that the message belongs to
	 */
	public $category;
	/**
35
	 * @var string the language ID (e.g. en-US) that the message is to be translated to
Qiang Xue committed
36 37 38
	 */
	public $language;
}