Doesn't work with Vue and vuex-i18n
See original GitHub issueDescribe the bug
There is an icon in the vscode sidebar, but got empty content. The app is built with Vue.js(2.6.10)
and Vuex-i18n(1.13.1)
, and the i18n works well, but the extension just doesnโt work whether I config locale path or not.
Extension Version
i18n Ally (1.13.6)
Framework/i18n package you are using
Vue.js(2.6.10)
, vuex-i18n (1.13.1)
Device Infomation
- OS: Windows
- Version: 7
- VSCode Version: 1.41.1
Extension Log Sorry I canโt paste the log from the cloud environment, but it seems normal, you can see it from the picture below. It detects vue successfully and the locales loading path is correct, too.
Screenshots
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (4 by maintainers)
Top Results From Across the Web
Vue-i18n undefined in vuex [duplicate]
But surprisingly doesn't work... it says this.$i18n is not defined, but it is. enter image description here Any thoughts?? import storeย ...
Read more >How to use $t from vue-i18n inside Vuex action - Get Help
A problem that I am having is dynamic changing. So I can now access the t() function in my vuex store, but when...
Read more >Vue i18n: Building a multi-language app with locale switcher
Vue i18n is a key process needed to localize your Vue apps and websites. Learn how to set up a Vue app with...
Read more >vuex-i18n/readme.md
19, The vuex-i18n plugin is intended to be used for applications that use vuex as ; 20, store and require localized messages. Make...
Read more >Vue 2 Localization with Vue I18n: A Step-by-Step Guide
json file. Note ยป If you have an existing Vue project, and don't want to install the Vue CLI, you can recreate the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@pureliumy I can share with you my config that works. I am using Vue and Vue-i18n.
first my i18n plugin file (imported from main.ts)
I store my locale files in /src/locales/{en, fr, โฆ} like this: /src/locales/ index.ts โ en โ initial.json โ activities.json โ index.ts โ fr โ initial.json โ activities.json โ index.ts
the locales/index.ts file looks like this:
the en / fr index.ts file looks like this:
the activities.json file looks like this:
Ok, thatโs how the code is setup. Now lets look at how I have the extension hooked up: I like to keep everything configured at the workspace level rather than the user level so that when I switch machines everything is the same. So, in my project directory, there is a .vscode folder and in there is a settings.json for my VSCode settings. It contains the following:
I just checked and there is nothing defined in the user settings.json file.
With this setup, I see the following in the output tab:
This gets me all setup. Then I can do the following things in VSCode:
This all works really well when setup. I am really greatful for this extension.
I hope this helps you get the extension working in your project. I donโt think I missed any part of the configuration.
Closing this for now. Feel free to reopen if you still have any questions.