Reputation: 334
I want to try Interpolation with Vue3 + vue-i18n 9.3. When I try to pass argument I'm getting;
Message compilation error: Not allowed nest placeholder
1 | Showing {{from}} to {{to}} of {{total}} entries
My locale json file;
...
"showing_0_to_0_of_0_entries": "Showing {{from}} to {{to}} of {{total}} entries",
...
Inside my component;
<div class="info">{{ $t('showing_0_to_0_of_0_entries',{ from: 0, to: 15, total:8 }) }}</div>
But It's not working, I'm getting error and in my page displaying text like that;
Showing {{from}} to {{to}} of {{total}} entries
Not veriables passing. What ı can do?
Upvotes: 4
Views: 2169
Reputation: 334
According to documentation I should use one curly brackets like {}
. So here is my solution;
"showing_0_to_0_of_0_entries": "Showing {from} to {to} of {total} entries",
Upvotes: 6