SimilarThis is similar to Stef Van Looveren's answer, but instead of loading all tidsthe taxonomy term IDs and then checking if each one has a specific translation we can, I include the language condition in the entity query. (Using Drupal 9)
$vocabulary = 'MY_VOCABULARY_NAME'; $language = \Drupal::languageManager()->getCurrentLanguage()->getId(); $tids = \Drupal::entityQuery('taxonomy_term') ->condition('vid', $vocabulary) ->condition('langcode', $language) ->sort('weight') ->execute(); $terms = \Drupal\taxonomy\Entity\Term::loadMultiple($tids); $termList = array(); foreach($terms as $term) { $tid = $term->id(); $translated_term = \Drupal::service('entity.repository')->getTranslationFromContext($term, $language); $termList[$tid] = $translated_term->getName(); } $vocabulary = 'MY_VOCABULARY_NAME'; $language = \Drupal::languageManager()->getCurrentLanguage()->getId(); $tids = \Drupal::entityQuery('taxonomy_term') ->condition('vid', $vocabulary) ->condition('langcode', $language) ->sort('weight') ->execute(); $terms = \Drupal\taxonomy\Entity\Term::loadMultiple($tids); $termList = []; foreach ($terms as $term) { $tid = $term->id(); $translated_term = \Drupal::service('entity.repository')->getTranslationFromContext($term, $language); $termList[$tid] = $translated_term->getName(); } This would return any term that has the translation $language translation, while using loadByProperties() only returns the entity if the original language is $language.