react-translate-component
react-translate-component copied to clipboard
Add children to Translate
Hello,
I'm trying to achieve the following HTML in React:
<a className="collapsible-header">
// the value on the next line is the text which needs translation
language
<i className="material-icons">arrow_drop_down</i>
</a>
and I'm trying this:
<Translate
content="language"
component="a"
className="collapsible-header"
children={
<i className="material-icons">arrow_drop_down"</i>
}
/>
But the "i" tag isn't rendered.
If the "children" isn't supported, is there another way for this ?
@davidlubomirov I'm not sure what actually need to be translated. Perhaps it's "arrow_drop_down"?
Would doing it like this solve the issue?
<a className="collapsible-header">
<Translate
component="i"
className="material-icons"
content="some.translation.key"
/>
</a>