fosrl.pangolin/src/components/LocaleSwitcher.tsx

60 lines
1.2 KiB
TypeScript
Raw Normal View History

import { useLocale } from "next-intl";
2025-05-04 15:11:42 +00:00
import LocaleSwitcherSelect from './LocaleSwitcherSelect';
export default function LocaleSwitcher() {
const locale = useLocale();
return (
<LocaleSwitcherSelect
2025-06-09 17:42:28 -04:00
label="Select language"
2025-05-04 15:11:42 +00:00
defaultValue={locale}
items={[
{
value: 'en-US',
label: 'English'
2025-05-04 15:11:42 +00:00
},
{
value: 'fr-FR',
label: "Français"
},
2025-05-04 15:11:42 +00:00
{
value: 'de-DE',
label: 'Deutsch'
},
{
value: 'it-IT',
label: 'Italiano'
},
2025-06-06 06:06:56 +00:00
{
value: 'nl-NL',
label: 'Nederlands'
},
{
value: 'pl-PL',
label: 'Polski'
},
{
value: 'pt-PT',
label: 'Português'
},
2025-06-06 06:06:56 +00:00
{
value: 'es-ES',
label: 'Español'
},
{
value: 'tr-TR',
label: 'Türkçe'
2025-06-05 17:30:49 +00:00
},
{
value: 'zh-CN',
label: '简体中文'
2025-07-12 13:21:14 +09:00
},
{
value: 'ko-KR',
label: '한국어'
2025-05-04 15:11:42 +00:00
}
]}
/>
);
}