Skip to content

Using dot notation keys without namespaces #148

Answered by amannn
dbrxnds asked this question in Q&A
Discussion options

You must be logged in to vote

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:

{
  "one.two": "12",
  "one": {"two": "12"}
}

That's why I'd like to avoid supporting it.

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@amannn
Comment options

@dbrxnds
Comment options

@deammer
Comment options

@amannn
Comment options

@deammer
Comment options

Answer selected by dbrxnds
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants