From 0808c0be686a2e895bb25e4b19adfe04251cdc63 Mon Sep 17 00:00:00 2001 From: Julien Gautier Date: Mon, 11 May 2026 20:46:30 +0200 Subject: [PATCH] feat(portal-shell): locale switcher in the footer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add a CDK-menu locale switcher (FR / EN) to the footer's right cluster, next to the accessibility link. Trigger reads the active locale from `` (set per locale by the build) and shows the native name plus a globe + chevron. Selecting another locale rewrites the URL prefix (`/en/...` ↔ `/fr/...`) and triggers a hard refresh so the right bundle boots — per ADR-0019. Architecture mirrors the existing theme switcher: - `@angular/cdk/menu` for the trigger + roving-focus menu + escape / click-outside dismissal. - `ViewEncapsulation.None` because the menu opens in an overlay portal outside the component host; BEM-style class names keep the global emissions contained. - The trigger's `aria-label` is `$localize`-marked with a named placeholder so screen readers announce the current language. Locale display names ("Français", "English") are deliberately NOT i18n-marked. Universal switcher convention: each language is always shown in its own language, both in the trigger label and the menu items — translating them would defeat the purpose. The ` + + + + diff --git a/apps/portal-shell/src/app/components/locale-switcher/locale-switcher.scss b/apps/portal-shell/src/app/components/locale-switcher/locale-switcher.scss new file mode 100644 index 0000000..23cf88c --- /dev/null +++ b/apps/portal-shell/src/app/components/locale-switcher/locale-switcher.scss @@ -0,0 +1,107 @@ +// Trigger sits inside the thin footer. Visual height stays small +// (~28px) but the tap target meets the AAA 44×44 minimum from +// ADR-0016 by extending vertical padding to the full footer height +// — the surrounding `