Let's imagine i18n.init() has the following resources:
resources: {
en: {
default: {
message: "Hello world <test>some text</test>!",
}
},
},
I'd like to consume such translation string inside component as:
t("message", {
test: text => <b>{text}</b>
})
And in the result we have something like it's written in JSX:
<>
Hello world <b>some text</b>!
</>
The children within <test></test> could be any of type as inside normal react-component.
Possible?
Let's imagine
i18n.init()has the following resources:I'd like to consume such translation string inside component as:
And in the result we have something like it's written in JSX:
The children within
<test></test>could be any of type as inside normal react-component.Possible?