Skip to content

Commit

Permalink
fix(i18n-provider): fix locale to ignore detection (#1170)
Browse files Browse the repository at this point in the history
  • Loading branch information
aralroca committed Apr 8, 2024
1 parent abc84aa commit 2052d85
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 2052d85

Please sign in to comment.