{source}<?php
defined('_JEXEC') or die;
$app = \Joomla\CMS\Factory::getApplication();
$uri = \Joomla\CMS\Uri\Uri::getInstance();
$path = $uri->getPath();
$imagesBase = 'images/flags';
$scheme = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') ? "https" : "http";
$host = $_SERVER['HTTP_HOST'];
$domain = $scheme . '://' . $host;
$translate_url = $domain.htmlspecialchars($path, ENT_QUOTES, 'UTF-8');
?>
<div class="language-flags" style="display: flex; flex-direction: column; gap: 10px; margin-top:-30px;">
<div style="height:1px; background:rgb(245, 228, 37); width:100%;"></div>
<a href="/<?php echo 'https://translate.google.com/website?sl=auto&tl=fr&hl=de&client=webapp&u='.$translate_url;?>" style="display: flex; align-items: center; margin-left: 15px;">
<img src="/<?php echo $imagesBase; ?>/fr.gif" alt="Français" style="width:18px;height:12px;">
<span style="margin-left: 8px; font-size:15px; font-weight:500; color:#fff;">Français</span>
</a>
<div style="height:1px; background:rgb(245, 228, 37); width:100%;"></div>
<a href="/<?php echo 'https://translate.google.com/website?sl=auto&tl=en&hl=de&client=webapp&u='.$translate_url;?>" style="display: flex; align-items: center; margin-left: 15px;">
<img src="/<?php echo $imagesBase; ?>/en.gif" alt="English" style="width:18px;height:12px;">
<span style="margin-left: 8px; font-size:15px; font-weight:500; color:#fff;">English</span>
</a>
<div style="height:1px; background:rgb(245, 228, 37); width:100%;"></div>
<a href="/<?php echo $translate_url; ?>" style="display: flex; align-items: center; margin-left: 15px;">
<img src="/<?php echo $imagesBase; ?>/de.gif" alt="Deutsch" style="width:18px;height:12px;">
<span style="margin-left: 8px; font-size:15px; font-weight:500; color:#fff;">Deutsch</span>
</a>
<div style="height:1px; background:rgb(245, 228, 37); width:100%;"></div>
</div>{/source}