How do I use a href-link
instead of <select>
to change language with vue.i18n?
<select v-model="$i18n.locale">
<option value="en">EN</option>
<option value="da">DA</option>
</select>
<a href="#" @click.prevent="$i18n.locale = 'en'">Set to EN</a>
<a href="#" @click.prevent="$i18n.locale = 'da'">Set to DA</a>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.