fosrl.pangolin/src/components/LocaleSwitcher.tsx
2025-05-04 15:11:42 +00:00

24 lines
507 B
TypeScript

import { useLocale, useTranslations } from 'next-intl';
import LocaleSwitcherSelect from './LocaleSwitcherSelect';
export default function LocaleSwitcher() {
const t = useTranslations('locales');
const locale = useLocale();
return (
<LocaleSwitcherSelect
defaultValue={locale}
items={[
{
value: 'en-US',
label: t('en-US')
},
{
value: 'de-DE',
label: t('de-DE')
}
]}
label={t('label')}
/>
);
}