vue-i18n-manager
vue-i18n-manager copied to clipboard
Translation is empty when variable does not exist
{{ $t('somekey', { name: userName }) }}
When the translation does not include a {name} occurrence, the result for the translation is completely empty.
Hi Peter, could you create a reproduction of this with a simple vue-cli application so that I can have a look?
Thanks
Just add a non-existing variable to a call to $t:
This works fine:
console.log(this.$t('some_key'));
This is undefined:
console.log(this.$t('some_key', { name: 'Bob' }));