News for hackers. Stuff that matters.
Re:Fluent 1.0: a localization system for natural-sounding tr... by Zenbit_UX on Wednesday April 17, 2019 @09:35AM (#19682381)
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.

There are no comments on this comment yet.