vue18n with dynamic message key into the template

Viewed 12

I'm using vue18n in my vue3 application. For a specific component I would like to provide my template with the translation key dynamically. So, I would like to use something like this:

<i18n-t keypath={{messageKey}} tag="p" id="myId>
...
</i18n-t>

So, instead of specifying a fixed string as a keypath, I would like to provide the message key dynamically. Is it possible?

1 Answers

Did you try to bind it, like :keypath="messageKey"

Related