Comments (2)
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.
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)
- this.$translate.textWithParams is returning the translation string HOT 3
- Not obvious way to localize attributes (like placeholder) HOT 3
- 'params' is a local function variable, isn't it? HOT 2
- tWithParams calls text() HOT 2
- this.params must be params HOT 2
- Vue.t should refer to textWithParams HOT 2
- Sould not exit textWithParams if locale is not available HOT 2
- Same keys get overridden HOT 1
- Getting text from globally translation file set HOT 3
- v-translate crashes on IE11 when trying to translate text passed in as prop HOT 5
- How do I translate out of a component HOT 2
- Use in variable HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vuetranslate.