mirror of
https://github.com/langgenius/dify.git
synced 2024-11-16 19:59:50 +08:00
24 lines
500 B
TypeScript
24 lines
500 B
TypeScript
'use client'
|
|
|
|
import { i18n } from '@/i18n'
|
|
import { setLocaleOnClient } from '@/i18n/client'
|
|
|
|
const LocaleSwitcher = () => {
|
|
return (
|
|
<div className="mt-4">
|
|
<p>Locale switcher:</p>
|
|
<ul>
|
|
{i18n.locales.map((locale) => {
|
|
return (
|
|
<li key={locale}>
|
|
<div className='cursor-pointer ' onClick={() => setLocaleOnClient(locale)}>{locale}</div>
|
|
</li>
|
|
)
|
|
})}
|
|
</ul>
|
|
</div>
|
|
)
|
|
}
|
|
|
|
export default LocaleSwitcher
|