shadcn.io is not affiliated with official shadcn/ui
Language Selector Footer Block for Ark UI
A footer for a meeting-notes tool whose segmented control (EN, FR, DE, ES) rewrites the footer's own words, with three link groups and a legal row.
Installation
Overview
A footer that speaks four languages for React with Ark UI. At the start, the wordmark and a one-sentence tagline; at the end, three groups of links in a nav labelled Footer. A band across the foot holds a globe icon and a segmented control with four languages (EN, FR, DE, ES) at the start, and the copyright, the policies and "All rights reserved" at the end. Choosing a language rewrites every word of the footer from one typed dictionary, marks each rewritten part with its lang, and says "Language: Français" in a polite live line. The tagline's cell is as tall as the longest version, so nothing moves under the pointer. The page's rails and top rule come from the Guides spine, and the band's rule is drawn by Guides too, with none under it because a footer ends the page. It's built from Segment Group and Guides, with your theme's tokens for every colour.
FAQ
How do I add a language or change a string?
Edit TRANSLATIONS at the top of the file: each entry is a language's code, its own name, the tagline, the three groups (a title and four link labels each), the two policies and the rights line. Add an entry and a fourth segment appears in the control, in the order of the array. Every language needs the same number of groups and links, because the footer is drawn from the selected entry alone.
Does it translate the page, or only the footer?
Only the footer: the choice lives in this block's own state and changes the words it draws. It does not reload the page, set a cookie or change your site's locale. To make it a real language switch, call your router's locale change (or set the cookie your server reads) inside the choose handler and keep the dictionary for the footer's strings.
What does lang do on the rewritten parts?
lang do on the rewritten parts?Each rewritten heading, link, sentence and the tagline carries lang with the language's code, so a screen reader switches pronunciation for that text and the browser hyphenates and picks fonts for it. The control's own label stays in English, because the person using it may not read the language they just chose, and each segment has a visually hidden name in its own language ("Français", "Deutsch").
What does a screen reader say when I change language?
A live line that exists from the start and is empty until the first change says "Language: Français" once, politely. It never speaks on load. The segments are real radio buttons, so Tab reaches the group, the arrow keys move between the languages and a screen reader hears "English, radio button, 1 of 4".