LocaleSwitcher
MoleculeA language picker for public pages. Options are links when they have an href (a native details menu, so it works without JavaScript) or buttons when they do not. Names are shown in their own language with lang and dir set, the current locale is marked in text, and a locale whose page falls back to another language says so. Not the flag dropdown LanguageSwitcher of the common domain: no flag assets and no i18n dependency.
English
<LocaleSwitcher locales={locales} current="en" /><LocaleSwitcher variant="inline" locales={localesWithoutHref} current="en" onChange={(code) => setLocale(code)} />English
<div dir="rtl"><LocaleSwitcher locales={locales} current="ar" /></div>