How to get current language in html.html.twig of theme I need to get the current language in the html.html.twig file of my theme. In my page.html.twig I can use:

{% if (language.getId() == 'nl') %}


This does not work in my html.html.twig. Any ideas?
Add the following snippet in your .theme file:

function MYTHEME_preprocess_html(&amp;$variables) {
  $variables['lang'] = \Drupal::languageManager()-&gt;getCurrentLanguage()-&gt;getId();
}


Then, in your html.html.twig file use:

{% if (lang == 'en') %}
  // Your action
{% endif %}