Replies: 1 comment
-
Hi, I'm very late to the party, but it sounds that your case could be solved by deep-merging both locales before serving? I'll post a link to that. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I'm in the process of implementing localization using
next-intl
for our project.We would like to have our messages split into multiple files by namespaces or components as suggested in docs.
Similarly, we also want to use strings in "en/[namespace].json" as our fallback language. For any keys in a [namepace].json, if translation is not present in specified
locale
, we like to display text from "en/[namespace].json".Docs mention
What is the best way to combine both the scenarios to get the default from "en\login.json" for "key1" if "fr\login.json" is missing key "key1"? Do we need to merge locale specific and default json files for each namespace in this case or are there any better approaches?
Appreciate any input and thoughts here. Thank you.
Beta Was this translation helpful? Give feedback.
All reactions