3 ms·
This is how I handle those cases in vue: clickHere: { one: 'Please' two: { singular: ' click here {0} time ', plural: ' click here {0} times '
by Zenbit_UX 8y ago
This is how I handle those cases in vue:
clickHere: {
one: 'Please'
two: {
singular: ' click here {0} time ',
plural: ' click here {0} times '
},
three: 'to continue',
link: 'google.com/en/'
}
<span>
{{ this.$i18n('clickHere.one') }}
<a href="{{ this.$i18n('clickHere.link') }}" >{{ this.count > 1 ? this.$i18n('clickHere.two.plural', this.count) }} : this.$i18n('clickHere.two.singular', this.count) }}<\a>
{{ this.$i18n('clickHere.three') }}
<\span>
Don't forget to localize your links! English might not need it but many languages eventually will point to a different url.