Locale Switcher

Language picker. The app stores the choice and re-renders the provider.

Rafael pede aprovação

Proposal for Acme Bistro

  • há 2 minutos
  • R$ 449,00
  • 250.000

Installation

Once per app, set up Aedis UI. The CLI verifies the signed release before writing anything and pins every dependency:

npx @aedis/cli@0.1.0 init

Import the theme once in your global CSS, after Tailwind:

app/globals.css
@import "tailwindcss";@import "./styles/aedis-theme.css";

Then add the component:

npx @aedis/cli@0.1.0 add locale-switcher# pnpm dlx @aedis/cli@0.1.0 add locale-switcher · yarn dlx @aedis/cli@0.1.0 add locale-switcher · bunx @aedis/cli@0.1.0 add locale-switcher

Props

PropTypeDefaultDescription
locales{ code; label }[]—Options, each label in its own language.
valuestring—Selected locale. Defaults to the provider locale.
onChange(code) => void—Called with the chosen BCP 47 tag.
labelstring—Accessible name. Defaults to the dictionary.

Security

  • A native select: keyboard and screen readers work everywhere; each option carries its own lang.