Replies: 2 comments 3 replies
-
Hey @dejurin and thanks for the question!
Can you expand a bit more on your example? I guess you have something more sophisticated in mind, since the particular example you're mentioning would work with just |
Beta Was this translation helpful? Give feedback.
-
I would also like the pass of data models as a value for interpolation interpolation {
"common": {
"data": {
"title": "Hello {name.1}",
"description": "Hi, this is {SEO.description}",
}
}
} const data = { name: ['world', 'worlds'], SEO: {description: 'summary text' }}
t('common.data.title', data)
// result: Hello worlds
t('common.data.description', data)
// result: Hi, this is summary text and const data = { name: ['world', 'worlds'], SEO: {description: 'summary text' }}
t('common.data', data)
// result object: {title: 'Hello worlds', description: 'summary text'} Nasted Also the ability to refer to a repeated meaning, so as not to write the same words in different places. More: formatjs/formatjs#1270 |
Beta Was this translation helpful? Give feedback.
-
Something like this?
Beta Was this translation helpful? Give feedback.
All reactions