Howto detect user/session language using php

Hi I am trying to make a funcktion in the email_template app that inserts some body text if the user/session is eng. and another body text if the user/session is danish…how do i detect the language

Hey,

$languageCode = $this->configManager->getUserValue($userId, 'core', 'lang');

I used it here in the Audio Player to get the language of a user during occ execution