Comments (7)
Hey @davidtovt are you using webpack?
Also can you share the code where you import the code?
from laravel-vue-i18n.
@xiCO2k Yes, I use Webpack.
I share my code:
https://i.imgur.com/VwjrjHr.png
And there is an error in node_modules/laravel-vue-i18n/tsconfig.json
https://i.imgur.com/ptbhdeu.png
from laravel-vue-i18n.
THanks @davidtovt
try this:
resolve: (lang) => import(`../lang/{lang}.json`),
it will tell webpack
to take a look on the lang folder and chunk every lang file.
from laravel-vue-i18n.
@xiCO2k then I get the same error, just with en_json:
GET http://***.com/js/resources_lang_en_json.js net::ERR_ABORTED 404 (Not Found)
Uncaught (in promise) TypeError: Cannot load lang: en file: Loading chunk resources_lang_en_json failed.
from laravel-vue-i18n.
Weird case, try this since I miss the $ sign
resolve: (lang) => import(`../lang/${lang}.json`),
from laravel-vue-i18n.
It is not working.
In laravel-vue-i18n/src/index.ts there is a line which not used anywhere:
import { LanguageJsonFileInterface } from './interfaces/language-json-file'
It is not problem?
from laravel-vue-i18n.
Should not be related, one thing can you check if the path is correct to your language files?
from laravel-vue-i18n.
Related Issues (20)
- Could you please add the example with lang/en/auth.php structure?
- lang and fallbackLang not working HOT 1
- Should not generate extra file while Laravel using json locale file HOT 3
- Error: Unknown variable dynamic import: ../lang/en.json HOT 5
- Translation return key and not value after refreshing page HOT 4
- How can I pass a default value for the case of a non-existent or empty-string translation? HOT 2
- [REQ] React version HOT 1
- Library should work for nested keys in translation files. HOT 1
- Problem with php langs generation HOT 6
- Console error after vue 3.4 update HOT 2
- Language switches from english to the selected language HOT 2
- Update supported vue version to 3.4 HOT 1
- path.key not working at all HOT 1
- [REQ]: React support HOT 1
- Explain difference between trans, wTrans and $t? HOT 1
- Errors when building with TypeScript - `No overload matches this call` HOT 1
- TypeError: Cannot read properties of undefined (reading 'kind') when adding i18n() to plugins in vite.config.js HOT 3
- Object Translation HOT 2
- add transTo method for getting translation of specific lang HOT 1
- Uncaught (in promise) TypeError: Cannot read properties of null (reading 'replace') HOT 5
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 laravel-vue-i18n.