the Bosnian language has the wrong flag

Created on 4 December 2024, 14 days ago

Hi there,
first I want to praise your module. Very nice and functional.
The Bosnian language has the wrong flag.
in the program 'LanguageSelectorBlock.php'
you have hard coded flag code for English language. ("en" ? "gb") the same should be done for the Bosnian language ("bs" ? "ba")

Thanks Mirsad

/**
* Set the custom info to the links.
*
* @param \stdClass $links
* The links.
*
* @return void
*/
private function parseLinks(\stdClass &$links): void {
$current_language = $this->languageManager->getCurrentLanguage();
foreach (array_keys($links->links) as $langcode) {
$language = $this->languageManager->getLanguage($langcode);
$flagcode = $langcode == 'en' ? 'gb' : $langcode;
$links->links[$langcode]['langcode'] = $language->getId();
$links->links[$langcode]['icon'] = $this->getFlagIcon($flagcode);
$links->links[$langcode]['uri'] = $this->getCurrentUri($langcode);
$links->links[$langcode]['current_langcode'] = $current_language->getId();
}
}

๐Ÿ› Bug report
Status

Active

Version

1.4

Component

Code

Created by

๐Ÿ‡ง๐Ÿ‡ฆBosnia and Herzegovina cobra007

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024