Always the best way to get the current language:
$GLOBALS['TSFE']->sys_language_uid
or
$GLOBALS['TSFE']->sys_language_content
based on the fact that you get the current language identifier, and you can give a condition for this.
Ashish v
source share