How to insert components into translation #120
Unanswered
alphaCastor
asked this question in
Q&A
Replies: 1 comment
-
Hi @alphaCastor. <script>
import {browser} from '$app/environment';
</script>
{@html $t('key', { link: browser ? null : LinkComponent.render({/* component props */}).html })} Note that the nested component won't be reactive (changing the component props won't re-render the component). Hope that helps.. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi there,
Thanks for your work, it is really easy to work with that library.
Now I faced with one thing I don't know how to resolve.
I am working on an app and I have many texts like that:
As you can see here we have some components between raw text. Is it any way I can achieve it with library?
I would like to achieve something like that:
en.json
and in component:
Beta Was this translation helpful? Give feedback.
All reactions