mirror of
https://github.com/fosrl/pangolin.git
synced 2025-09-01 07:20:06 +02:00
Add first i18n stuff
This commit is contained in:
parent
21f1326045
commit
7eb08474ff
35 changed files with 2629 additions and 759 deletions
24
src/components/LocaleSwitcher.tsx
Normal file
24
src/components/LocaleSwitcher.tsx
Normal file
|
@ -0,0 +1,24 @@
|
|||
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')}
|
||||
/>
|
||||
);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue