Internationalize the cache approximately and internationalize it

Related tags

i18n vue-i18n-storge
Overview

vue-i18n-storge

一个基于 vue-i18n 的扩展, vue-i18n 原有功能及配置完全保留,主要功能有以下几点:

  1. 指定语言包配置模块,统一加载,无需单个 import 进来
  2. 当前语言缓存cookie
  3. 提供setLocale()和getlLocale()函数

安装

npm install vue-i18n-storge -S

使用

import Vue from 'vue'
import VueI18nObServer from '../libs/vue-i18n-observer'

Vue.use(VueI18nObServer)

const i18n = new VueI18nObServer({
  default: 'zh-CN',
  files: require.context('../locales', true, /\.js$/)
})

export default i18n
default

指定默认的语言

files

语言包的路径

使用 i18n.locale = 'en-US' 和 i18n.setLocale('en-US') 的区别

i18n.setLocale 会缓存到 cookie ,并且会刷新页面

i18n.locale = 'en-US' 不会缓存到 cookie,不会刷新页面

You might also like...
:camera: Responsive and customizable image and video gallery, carousel and lightbox, optimized for both mobile and desktop web browsers.
:camera: Responsive and customizable image and video gallery, carousel and lightbox, optimized for both mobile and desktop web browsers.

vue-gallery 📷 VueJS responsive and customizable image and video gallery, carousel and lightbox, optimized for both mobile and desktop web browsers. E

Cross-platform mobile App developed with Ionic, Capacitor and Vue3 to manage and share vegetarian meals, recipes and products, using device's internal storage, camera, geolocation, share and network functionalities.
Cross-platform mobile App developed with Ionic, Capacitor and Vue3 to manage and share vegetarian meals, recipes and products, using device's internal storage, camera, geolocation, share and network functionalities.

Cross-platform mobile App developed with Ionic, Capacitor and Vue3 to manage and share vegetarian meals, recipes and products, using device's internal storage, camera, geolocation, share and network functionalities.

Vue component who put SortableJS/Vue.Draggable and tangbc/vue-virtual-scroll-list together and allow drag-and-drop and big amount data list with high scroll performance.
Vue component who put SortableJS/Vue.Draggable and tangbc/vue-virtual-scroll-list together and allow drag-and-drop and big amount data list with high scroll performance.

Vue component who put SortableJS/Vue.Draggable and tangbc/vue-virtual-scroll-list together and allow drag-and-drop and big amount data list with high scroll performance.

The open-source frontend for any eCommerce. Built with a PWA and headless approach, using a modern JS stack. We have custom integrations with Magento, commercetools, Shopware and Shopify and total coverage is just a matter of time. The API approach also allows you to merge VSF with any third-party tool like CMS, payment gateways or analytics. Newest updates: https://blog.vuestorefront.io. Always Open Source, MIT license. Over 90 Bootstrap based Vue.js components and directives. CoreUI React.js UI Components. CoreUI for Vue.js replaces and extends the Bootstrap javascript. Components have been built from scratch as true Vue components, without jQuery and unneeded dependencies. 🌟 DataFormsJS 🌟 A minimal JavaScript Framework and standalone React and Web Components for rapid development of high quality websites and single page applications.
🌟 DataFormsJS 🌟 A minimal JavaScript Framework and standalone React and Web Components for rapid development of high quality websites and single page applications.

🌟 Welcome to DataFormsJS! Thanks for visiting! 🌠 👍 🌐 🌎 🌏 🌍 中文 (简体) 欢迎来到 DataFormsJS Español Bienvenido a DataFormsJS Português (do Brasil) Bem

Nuxt Headless CMS is a template for personal websites and blogs. The project was made with Nuxt.js and Contentful as a headless CMS and Vuetify as a UI framework.

Nuxt Headless CMS Nuxt Headless CMS is a template for personal websites and blogs. The project was made with Nuxt.js and Contentful as a headless CMS

A vue component library incubated from Tencent BlueKing which helps OPS in the field of front-end engineering to quickly build stable, accurate, and technologically-sense operation and maintenance tools and platforms

English | 简体中文 bk-vue-cec 基于蓝鲸 bk-magic-vue 修改风格并修复bug后的组件库,由DAO(去中心化自治组织)维护,收录于ti-design体系,请注意,其中cec表示community edtion components(社区版组件),并不是代表China E

Taranis NG is an OSINT gathering and analysis tool for CSIRT teams and organisations. It allows team-to-team collaboration, and contains a user portal for simple self asset management. Taranis NG was developed by SK-CERT with a help from wide CSIRT community.
Catus Notebook is an effective and elegant “note as todos” software that allows you to schedule your life and work easily and safely

Catus Notebook The Catus Notebook combines the defination for both a note and a todo to enable you to easily create, edit and schedule your notes effe

This website is implemented with Nuxt.js as a server-side and PWA, and fully communicates with API, and Vuetify.js is used in the design.
This website is implemented with Nuxt.js as a server-side and PWA, and fully communicates with API, and Vuetify.js is used in the design.

Diamond book store This website is implemented with Nuxt.js as a server-side and PWA, and fully communicates with API, and Vuetify.js is used in the d

MKTemplate is Free and Open Source. It features multiple HTML and VueJS elements and it comes with dynamic components for VueJS
MKTemplate is Free and Open Source. It features multiple HTML and VueJS elements and it comes with dynamic components for VueJS

MKTemplate A beautiful UI . Start your Web Site with this bootstrap and VueJS UI . MKTemplate is Free and Open Source. It features multiple HTML and V

An app that you can search for stock symbols and check daily, weekly and monthly open, high, low, close and volume data belongs to the searched company stock.

Vue Stock Market App This is the solution for Reengen Full Stack Bootcamp with Vuejs and Nodejs Week-3 Project. It is built with Vuejs by using Vue CL

Customization-first, performance-oriented and elegant UI framework for eCommerce (and not only) based on Vue.js and Google Retail UX Playbook.
Customization-first, performance-oriented and elegant UI framework for eCommerce (and not only) based on Vue.js and Google Retail UX Playbook.

Storefront UI Current status: Stable beta! Customization-first, performance-oriented and elegant UI framework for eCommerce (and not only) based on Vu

A Project which can be deployed to a local network and provides a way to view and upload files (Video, Audio and Images)
A Project which can be deployed to a local network and provides a way to view and upload files (Video, Audio and Images)

Best-README-Template An awesome README template to jumpstart your projects! Explore the docs » View Demo · Report Bug · Request Feature Table of Conte

Rick-and-morty-vue - Rick And Morty WebSite Using Vue And API

Rick And Morty Vue The vue.js project I made using the Rick and Morty API servic

Vuejs-Flask-Text-Parser-and-highlighter - Text parser and highlighter built in Vuejs and Flask using the spacy python library  Drag and drop page builder and CMS for React, Vue, Angular, and more
Drag and drop page builder and CMS for React, Vue, Angular, and more

Drag and drop page builder and CMS for React, Vue, Angular, and more Integrate with any site or app. Use your code components. High speed, full contro

Owner
ziping
ziping
This is a lightweight and typesafe frontend internationalization library for Vue 3 applications.

Vue3-i18n This is a lightweight and typesafe frontend internationalization library for Vue 3 applications. Basic Features define translation objects g

Planning.nl 1 Nov 14, 2021
vue-18n-scanner analyses your Vue.js source code in order to report unused keys, missing translations, and update your translation files

vue-i18n-scanner Translation string analyzer that reports missing and unused keys vue-i18n-scanner is built to work with your Vue.js projects using vu

Nuno Balbona 4 Oct 25, 2022
Async store and load vue-i18n messages

vue-i18n-fetch Async store and load vue-i18n messages Requeriments Currently this package is only compatible with Vue I18n v9 Installation NPM npm ins

Acium Global 0 Jun 4, 2021
Npm which compares json files to each other and displays them in a table

???? compare-json-translations Description This npm compares all .json files and allows the user to quickly find missing or duplicate values in those

Lena 2 Jun 25, 2022
Localization for Vue and Laravel

Localization for Vue and Laravel This package allows to easily setup localization with a Laravel application using Vue. It is based on Lang.js.

Enzo Innocenzi 31 Sep 13, 2022
Package to allow for fetching of translations from remote server using Vue, VueI18n and Axios

vuex-i18n-remote This is a small package that can be used to load translations from a remote server. This is best used with grouped short key based tr

Jarryd Lisher 0 Oct 9, 2019
A page navigation library, record routes and cache pages, like native app navigation. 一个页面导航库,记录路由并缓存页面,像原生APP导航一样。

vue-navigation require vue 2.x and vue-router 2.x. 中文文档 vue-navigation default behavior is similar to native mobile app (A、B、C are pages): A forward t

zack 1000 Nov 23, 2022
cache vuex action when dispatch

vuex-cache Cache dispatched actions and prevent repeated requests and heavy actions. Compatibility Map and Promise are required (you can use polyfills

superwf 512 Nov 6, 2022
cache vuex action when dispatch

vuex-cache Cache dispatched actions and prevent repeated requests and heavy actions. Compatibility Map and Promise are required (you can use polyfills

superwf 512 Nov 6, 2022
Mobile app development framework and SDK using HTML5 and JavaScript. Create beautiful and performant cross-platform mobile apps. Based on Web Components, and provides bindings for Angular 1, 2, React and Vue.js.

Onsen UI - Cross-Platform Hybrid App and PWA Framework Onsen UI is an open source framework that makes it easy to create native-feeling Progressive We

null 8.7k Nov 29, 2022