2
0

🚑 Fix pt-BR i18n loading

This commit is contained in:
Baptiste Arnaud
2023-09-05 18:36:22 +02:00
parent aaa208cef4
commit be0c619316
4 changed files with 13 additions and 13 deletions

View File

@ -22,7 +22,7 @@ const nextConfig = {
], ],
i18n: { i18n: {
defaultLocale: 'en', defaultLocale: 'en',
locales: ['en', 'fr', 'pt', 'pt_BR', 'de'], locales: ['en', 'fr', 'pt', 'pt-BR', 'de'],
}, },
experimental: { experimental: {
outputFileTracingRoot: join(__dirname, '../../'), outputFileTracingRoot: join(__dirname, '../../'),

View File

@ -19,11 +19,11 @@ import { ChevronDownIcon } from '@/components/icons'
import { MoreInfoTooltip } from '@/components/MoreInfoTooltip' import { MoreInfoTooltip } from '@/components/MoreInfoTooltip'
const localeHumanReadable = { const localeHumanReadable = {
en: 'English', en: 'English',
fr: 'Français', fr: 'Français',
de: 'Deutsch', de: 'Deutsch',
pt: 'Português', pt: 'Português',
pt_BR: 'Português (BR)' 'pt-BR': 'Português (BR)',
} as const } as const
export const UserPreferencesForm = () => { export const UserPreferencesForm = () => {

View File

@ -1,6 +1,6 @@
import { createI18n } from 'next-international' import { createI18n } from 'next-international'
export type I18nFunction = (key: string) => string; export type I18nFunction = (key: string) => string
export const { export const {
useI18n, useI18n,
@ -11,9 +11,9 @@ export const {
useChangeLocale, useChangeLocale,
defineLocale, defineLocale,
} = createI18n({ } = createI18n({
en: () => import('./en'), en: () => import('./en'),
fr: () => import('./fr'), fr: () => import('./fr'),
pt: () => import('./pt'), pt: () => import('./pt'),
pt_BR: () => import('./pt_BR'), 'pt-BR': () => import('./pt-BR'),
de: () => import('./de'), de: () => import('./de'),
}) })