Closed sshmaxime closed 5 days ago
In the docs it is mentioned that it is recommended to have an object to represent an array: https://next-intl-docs.vercel.app/docs/usage/messages#arrays-of-messages
Ideally, I want to iterate over an array until the end of it without having to do this:
const messages = useMessages(); const keys = Object.keys(messages.homepage);
Is this possible ? Couldn't find anything in the doc
Be able to iterate of an array looking like that:
{ "categories":[ { "title":"Y" }, { "title":"X" }, { "title":"Z" } ] }
None.
Nope, currently only the approach that is outlined in the docs is supported. This has already been discussed various times in GitHub issues and discussions, please also see related conversations.
Is your feature request related to a problem? Please describe.
In the docs it is mentioned that it is recommended to have an object to represent an array: https://next-intl-docs.vercel.app/docs/usage/messages#arrays-of-messages
Ideally, I want to iterate over an array until the end of it without having to do this:
Is this possible ? Couldn't find anything in the doc
Describe the solution you'd like
Be able to iterate of an array looking like that:
Describe alternatives you've considered
None.