vue-lang-meta-router

0.1.0 • Public • Published

Vue-Lang-Meta-Router

Vue router extension for scenarios with international languages and dynamic titles

🍕 International seamless routing, asynchronous loading of translation

🎻 URL localization (short links can be customized)

🔫 Support setting the default language (there is no language prefix in the URL)

🍖 load the last used language when you visit the website again

🌸 dynamic update of the page title

Install

$ npm i vue-lang-meta-router -S

Usage

// router.js or router/index.js
import {
  VueLangRouter,
  VueMetaInfo
} from 'vue-lang-meta-router'
import translations from './lang/translations'
import localizedURLs from './lang/localized-urls'

Vue.use(VueMetaInfo)

Vue.use(VueLangRouter, {
  defaultLanguage: 'en',
  translations,
  localizedURLs,
})

image

Readme

Keywords

none

Package Sidebar

Install

npm i vue-lang-meta-router

Weekly Downloads

3

Version

0.1.0

License

ISC

Unpacked Size

53.3 kB

Total Files

6

Last publish

Collaborators

  • candy-_-