original_string: public function setLanguage(Event $event)
      {
          /**
           * @var $app Application
           */
          $app = $event->data;
          foreach ($this->handlers as $handler) {
              $intersection = array_intersect($this->languages, $handler->getLanguages());
              if (!empty($intersection)) {
                  Yii::$app->language = current($intersection);
                  break;
              }
          }
          $app->trigger(self::EVENT_AFTER_SETTING_LANGUAGE);
      }
code: public function setLanguage(Event $event)
      {
          /**
           * @var $app Application
           */
          $app = $event->data;
          foreach ($this->handlers as $handler) {
              $intersection = array_intersect($this->languages, $handler->getLanguages());
              if (!empty($intersection)) {
                  Yii::$app->language = current($intersection);
                  break;
              }
          }
          $app->trigger(self::EVENT_AFTER_SETTING_LANGUAGE);
      }
code_tokens: public function setLanguage ( Event $ event ) { /**
           * @var $app Application
           */ $ app = $ event -> data ; foreach ( $ this -> handlers as $ handler ) { $ intersection = array_intersect ( $ this -> languages , $ handler -> getLanguages ( ) ) ; if ( ! empty ( $ intersection ) ) { Yii :: $ app -> language = current ( $ intersection ) ; break ; } } $ app -> trigger ( self :: EVENT_AFTER_SETTING_LANGUAGE ) ; }
docstring: Sets the application language.
  
  @see Application::$language
  
  @param Event $event the event parameter used for an action event.
docstring_tokens: Sets the application language .