Skip to content

Commit

Permalink
fix(i18n-provider): fix locale to ignore detection
Browse files Browse the repository at this point in the history
  • Loading branch information
aralroca committed Nov 4, 2023
1 parent a4563c8 commit e9f2afb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/I18nProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default function I18nProvider({
const lang = lng || parentLang || locale || defaultLocale || ''
const config = { ...internal.config, ...newConfig }
const localesToIgnore = config.localesToIgnore || ['default']
const ignoreLang = localesToIgnore.includes(lang)
const ignoreLang = !lang || localesToIgnore.includes(lang)
const pluralRules = new Intl.PluralRules(ignoreLang ? undefined : lang)
const t = transCore({ config, allNamespaces, pluralRules, lang })

Expand Down

0 comments on commit e9f2afb

Please sign in to comment.