<?php
$currentLang = function_exists('ec_lang') ? ec_lang() : ($_SESSION['lang'] ?? 'ar');
$arClass = $currentLang === 'ar' ? 'active-lang' : '';
$enClass = $currentLang === 'en' ? 'active-lang' : '';
?>
<div class="easychair-lang-switch">
    <a class="<?php echo htmlspecialchars($arClass, ENT_QUOTES, 'UTF-8'); ?>"
       href="/easychair/lang?set=ar">
        عربي
    </a>

    <a class="<?php echo htmlspecialchars($enClass, ENT_QUOTES, 'UTF-8'); ?>"
       href="/easychair/lang?set=en">
        EN
    </a>
</div>
