Get the language from route
I actually had the same problem with a Drupal 8 site.

I know this is unlikely to sound like a problem, but I can think of at least one situation (the situation I am in!) where it is.

We have the CMS setup so that the admin interface is in the users preferred langauge (a request by the client) so they can copy-paste translated content in whilst keeping the admin interface in a language they can understand.

However this creates confusion, as \Drupal::languageManager()-&gt;getCurrentLanguage() returns the langauge the admin system is using, not the lanuage the content is in.

The easiest way I found around this was to do the following:

$node = \Drupal::routeMatch()-&gt;getParameter('node');
$currentLanguage = $node-&gt;langcode-&gt;value;

(if anyone is curious as to why $node-&gt;langcode-&gt;value works, this question has some good answers: How to get the property of a content object in Drupal 8)

This literally gets the current node you've viewing, and then the language the node is displaying in.