Skip to content

xbc30/vue-lang-meta-router

Repository files navigation

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

About

Vue router extension for scenarios with international languages and dynamic titles. Vue路由扩展,适用于具有国际语言和动态标题的场景

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published