-
Hi, We ran into an issue where we use dot notation for translations but with a flat messages json. Wondering if there is a way to make next-intl aware that we use a flat object, so dot notation is ignored and just assumes regular key lookup. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
Hi David, nice to hear from you! Currently Any chance you could transform your flat messages file to a nested one? Here's a simplified transformation script for inspiration. If we'd support dot notations in namespaces, a case like this would be ambiguous: {
"one.two": "12",
"one": {"two": "12"}
} That's why I'd like to avoid supporting it. |
Beta Was this translation helpful? Give feedback.
Hi David,
nice to hear from you! Currently
next-intl
does not provide an option to configure a custom namespace character (see #105).Any chance you could transform your flat messages file to a nested one? Here's a simplified transformation script for inspiration.
If we'd support dot notations in namespaces, a case like this would be ambiguous:
That's why I'd like to avoid supporting it.