Code Monkey home page Code Monkey logo

Comments (2)

javisperez avatar javisperez commented on June 10, 2024 1

I've made the change, is in the 1.2.0 release here: https://github.com/javisperez/vuetranslate/releases/tag/1.2.0 as i understand your need, you can now load the translations globally with something like:

import {MyLocales} from 'locales';

Vue.use(VueTranslate);

Vue.locales(MyLocales);

and after that everything should be normally usable.

I've also updated a little the README file, explaining some methods and events you could probably use. If you do give it a try, please let me know if you got it to work.

from vuetranslate.

javisperez avatar javisperez commented on June 10, 2024

Hey @JoshuaDoshua thank you for opening an issue! And yeah, that's a functionality i was thinking in adding, so i'll be working on it and let you know when is done :) hopefully, would be this weekend.

About your need, i dont have plenty experience with Vuex but as i see it you could just use

this.$translate.setLang('english')

or something when you receive a language shift notification via the Vuex store, but as i said, i have no experience with Vuex so i might be wrong.

If you give it a try just let me know please if you find any trouble and i'll try to help you, anyhow i'll add the functionality to dynamically load a single translation file. Good day!

from vuetranslate.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.