mirror of
https://github.com/fosrl/pangolin.git
synced 2025-07-31 08:04:54 +02:00
24 lines
507 B
TypeScript
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')}
|
|
/>
|
|
);
|
|
}
|