Jun 17, 2019 in Drupal 8, Snippets

Short snippet to get the enabled languages programmatically

$langcodes = \Drupal::languageManager()->getLanguages();
$langcodesList = array_keys($langcodes);