Closed chrisgms closed 8 months ago
I'm not sure to understand why this Interpolate
component is necessary. You can achieve the same by nesting multiple t()
:
export default {
hello: 'Hello {content}',
world: 'World'
} as const
{t('hello', {
name: <strong>{t('world')}</strong>
})}
Could that help for your use-case? If not, could you explain why you'd need an Interpolate
component?
Ah good point, did not think about nesting multiple t()
's. This should cover the needed cases. Thanks!
@QuiiBz is this functionality documented?
I see that it is possible to replace params with values wrapped in components like so:
Would it be possible to have interpolation without replacing params when needing to use more complex components or breaking up a string into different parts like so: