How to access current langcode in theme?
Here's how to do the same in Drupal 8:

$language = \Drupal::languageManager()-&gt;getCurrentLanguage();
// Will return "en".
$shortcode = $language-&gt;getId());
// Will return "English".
$language_name = $language-&gt;getName();


Read more here.