SHARE
TWEET

Untitled

a guest Apr 25th, 2019 70 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Vue.component('language-changer', {
  2.   template: `
  3.     <ul>
  4.       <li><a href="#" @click.prevent="changeLanguage('en')">EN</a></li>
  5.       <li><a href="#" @click.prevent="changeLanguage('ru')">RU</a></li>
  6.     </ul>`,
  7.   methods: {
  8.     changeLanguage(lang) {
  9.       this.$i18n.i18next.changeLanguage(lang);
  10.     },
  11.   },
  12. });
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top