public function resolveFile($file)
 {
     if (!is_file($file)) {
         throw new \yii\base\Exception('Source file not found.');
     }
     $data = json_decode(file_get_contents($file), true);
     foreach (Countries::find(1)->all() as $country) {
         $countryCode = strtoupper($country->iso_alpha2);
         if (isset($data[$countryCode])) {
             if (($message = $country->getAttribute($this->targetAttribute)) === null) {
                 throw new \yii\base\Exception('Bad target attribute value.');
             }
             Message::initDbMessage($this->category, $this->language, $message, $data[$countryCode]);
         }
     }
 }