Generates useful data for a locale switcher component. Here is a basic implementation:
1---2import { getSwitcherData, getLocale } from "i18n:astro";3 4const locale = getLocale();5const data = getSwitcherData();6---7 8<select onchange="location = this.value;">9 {10 data.map((e) => (11 <option value={e.href} selected={e.locale === locale}>12 {e.locale}13 </option>14 ))15 }16</select>