Home > database >  i18n Not allowed nest placeholder
i18n Not allowed nest placeholder

Time:09-14

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 >{{ $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?

CodePudding user response:

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",

Documentation

  • Related