Language Switcher

Dropdown for changing the active locale. Reads available locales from the @nuxtjs/i18n config and writes to the store on selection.

Default

Auto-populated locale list.

Dark previewReplay previewOpen in new tab

Usage

Import the parts you need from the component's folder.

ts
import { LanguageSwitcher } from "@/components/ui/language-switcher";

API Reference

LanguageSwitcher

PropTypeDefaultDescription
———No props. Reads the locale list from the i18n module.