import React from 'react' import { Dropdown, DropdownItem, DropdownMenu, DropdownToggle, } from './dropdown-menu' import { useTranslation } from 'react-i18next' import getMeta from '@/utils/meta' import Icon from '@/shared/components/icon' function LanguagePicker() { const { t } = useTranslation() const currentLangCode = getMeta('ol-i18n').currentLangCode const translatedLanguages = getMeta('ol-footer').translatedLanguages const subdomainLang = getMeta('ol-footer').subdomainLang const currentUrlWithQueryParams = window.location.pathname return ( {translatedLanguages?.[currentLangCode]} {subdomainLang && Object.entries(subdomainLang).map(([subdomain, subdomainDetails]) => { if ( !subdomainDetails || !subdomainDetails.lngCode || subdomainDetails.hide ) return null const isActive = subdomainDetails.lngCode === currentLangCode return (
  • {translatedLanguages?.[subdomainDetails.lngCode]}
  • ) })}
    ) } export default LanguagePicker