File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change 11import { Select } from '@chakra-ui/react'
22import { useLingui } from '@lingui/react/macro'
3- import { i18n } from " @lingui/core" ;
3+ import { i18n } from ' @lingui/core'
44import { useRouter } from 'next/navigation'
55
66export const LanguageSwitcher = ( ) => {
@@ -9,11 +9,16 @@ export const LanguageSwitcher = () => {
99 async function dynamicActivate ( event ) {
1010 const locale = event . target . value
1111 const catalog = await import ( `../locales/${ locale } /messages.js` )
12- i18n . load ( locale , catalog . messages ) ;
13- i18n . activate ( locale ) ;
12+ i18n . load ( locale , catalog . messages )
13+ i18n . activate ( locale )
1414 }
1515 return (
16- < Select variant = 'flushed' size = 'xs' defaultValue = "en" onChange = { dynamicActivate } >
16+ < Select
17+ variant = 'flushed'
18+ size = 'xs'
19+ defaultValue = 'en'
20+ onChange = { dynamicActivate }
21+ >
1722 < option value = 'en' > { t `English` } </ option >
1823 < option value = 'es' > { t `Spanish` } </ option >
1924 < option value = 'pt' > { t `Portuguese` } </ option >
You can’t perform that action at this time.
0 commit comments