Fallback locale for dialects #985
riccardolardi
started this conversation in
General
Replies: 2 comments
|
I've just added some tests in e6231f9 to verify this—hope this helps! |
0 replies
|
The lack of native dialect fallback in next-intl is a real gap — if your de-CH file is missing a key, you'd expect it to resolve from de before falling back to en, but it doesn't.
import { createLocaleChain } from 'next-intl-localechain';
const chain = createLocaleChain({
'de-CH': ['de-CH', 'de', 'en'],
'pt-BR': ['pt-BR', 'pt', 'en'],
});Ships with 75 pre-configured CLDR-based chains so you don't have to map dialect hierarchies yourself. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Does
next-intlsupport something similar to https://github.com/i18next/next-i18next?tab=readme-ov-file#fallback-locales ?My use case is that the default locale should be
de-CH(swiss german) and users with localedeshould be forwarded / should fall back tode-CH. Same withit-CH(swiss italian) andfr-CH(swiss french) that should also accept their "native" localeAll reactions