mirror of
https://github.com/fosrl/pangolin.git
synced 2025-08-01 08:34:53 +02:00
25 lines
507 B
TypeScript
25 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')}
|
||
|
/>
|
||
|
);
|
||
|
}
|