Feb 02, 2018 in Drupal 8, Snippets

Easy snippet to get your current language:

// Get current language code
$language = \Drupal::languageManager()->getCurrentLanguage()->getId();