Get vocabulario id by name translate

PHOTO EMBED

Thu Jan 18 2024 16:20:04 GMT+0000 (Coordinated Universal Time)

Saved by @saida

   $vocNew = \Drupal::entityTypeManager()->getStorage('taxonomy_vocabulary')
        ->loadByProperties(['name' => $map[2]]);
      

      if (!empty($vocNew)) {
        $vocNew = reset($vocNew);
        $vocabulary_id = $vocNew->id();
      }
content_copyCOPY