MissingTranslationEvent.php 1.1KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. /**
  3. * @link http://www.yiiframework.com/
  4. * @copyright Copyright (c) 2008 Yii Software LLC
  5. * @license http://www.yiiframework.com/license/
  6. */
  7. namespace yii\i18n;
  8. use yii\base\Event;
  9. /**
  10. * MissingTranslationEvent represents the parameter for the [[MessageSource::EVENT_MISSING_TRANSLATION]] event.
  11. *
  12. * @author Qiang Xue <qiang.xue@gmail.com>
  13. * @since 2.0
  14. */
  15. class MissingTranslationEvent extends Event
  16. {
  17. /**
  18. * @var string the message to be translated. An event handler may use this to provide a fallback translation
  19. * and set [[translatedMessage]] if possible.
  20. */
  21. public $message;
  22. /**
  23. * @var string the translated message. An event handler may overwrite this property
  24. * with a translated version of [[message]] if possible. If not set (null), it means the message is not translated.
  25. */
  26. public $translatedMessage;
  27. /**
  28. * @var string the category that the message belongs to
  29. */
  30. public $category;
  31. /**
  32. * @var string the language ID (e.g. en-US) that the message is to be translated to
  33. */
  34. public $language;
  35. }