Skip to content

Get all key / values from namespace json file by calling translate function without any keys #1073

Answered by aralroca
rolandjlevy asked this question in General
Discussion options

You must be logged in to vote

Is currently possible with:

t('namespace:.', { count: 1 }, { returnObjects: true })
/*
{
  "array-example": [
    { "example": "Example 1" },
    { "another-example": "Another example 1" }
  ]
}
*/

namespace:

{
  "array-example": [
    { "example": "Example {{count}}" },
    { "another-example": "Another example {{count}}" }
  ]
}

docs: https://github.com/aralroca/next-translate#7-nested-translations

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@rolandjlevy
Comment options

Answer selected by aralroca
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #1072 on June 17, 2023 12:53.