Fix all locales

This commit is contained in:
Sakura Knoll
2023-07-15 13:52:33 +09:00 Unverified
parent 5cb208b9a0
commit 730dcfac22
26 changed files with 340 additions and 281 deletions
+6
View File
@@ -1,4 +1,5 @@
import { useTranslation } from 'next-i18next'
import { useRouter } from 'next/router'
export function translate(
targetLocale: string = 'en_US',
@@ -9,3 +10,8 @@ export function translate(
}
export { useTranslation }
export function useLocale() {
const { locale } = useRouter()
return locale || 'en-US'
}