Comments (9)
Looks like the bug is fixed. Thank you, Paul! But there is another (rare) edge case. Will open up a new issue for it in a second
from i18n-module.
Hi guys, sorry for this frustrating issue. Hopefully it's fixed in v2.3.4.
@elpeyotl thanks for the repo, I tested it with the new version and it looks okay!
from i18n-module.
If I change your config file like this it works. But it not asynchrous anymore.
module.exports = {
locales: [{
code: 'fa',
iso: 'fa-IR',
name: 'فارسی',
langFile: 'fa.js'
}, {
code: 'en',
iso: 'en-US',
name: 'English',
langFile: 'en.js'
}],
defaultLocale: 'fa',
vueI18n: {
fallbackLocale: 'fa',
silentTranslationWarn: true,
messages: {
fa: require('../locales/fa.js'),
en: require('../locales/en.js'),
},
},
}
Probably you can use that as a workaround? Dont know why on inital load the language is not loaded. I have exact the same issue.
from i18n-module.
Even if I run "npm run build" and then "npm run start" i see the same behaviour.
from i18n-module.
If load the files not asynchrously it works:
vueI18n: {
messages: {
fr: require('./lang/fr-FR.json'),
en: require('./lang/en-US.json'),
de: require('./lang/de-DE.json')
},
from i18n-module.
I think it's similar to my problem discussing in #23 .
from i18n-module.
@mahmoudmy I downloaded your repo and was running it. Could find any issue? How to you build it? I run it with npm run dev. and it was showing first page in english. when i click on house it changed to arabic.
from i18n-module.
Thanks @elpeyotl . The first page wasn't in English, it just shows the message keys (CAPITAL LETTERS) and this is the bug!
from i18n-module.
Same problem here. It works in dev mode, but not in production (npm run build && npm start
)
from i18n-module.
Related Issues (20)
- i18n-t Bug HOT 2
- After reloading the page the language is set to default locale HOT 5
- The switchLocalePath method cannot get the incoming language address HOT 7
- nuxt/i18n custom route paths doesn't work HOT 2
- Repro projects no longer work HOT 1
- Generated canonical links do not point to main language, but to current language HOT 1
- Failed to switch page url with language switcher HOT 1
- Incorrect translations flash when using different domains with `swr` route rules
- Cannot use dynamic locale file HOT 4
- Overridden locale domains don't switch locale
- [Error after update to 8.3.1 from 8.3.0] First argument to String.prototype.startsWith must not be a regular expression HOT 2
- Vue Router logs unprefixed route as not found
- Update `nuxt-module-builder` to fix broken plugin inejcted types with `vue-tsc` 2.0+ HOT 7
- Redirects not working for translated routes HOT 1
- hi, I am learning nuxt+i18n, but I encountered a problem when using t in step HOT 2
- fix: invalid urls starting in v8.3.1
- Nuxt generate (SSG) does not update components outside of NuxtPage on locale change HOT 1
- After updating nuxt and i18n versions, i18n strictMessage doesn't work. HOT 2
- how can i add prefix before i18n language prefix? HOT 4
- I am not able to load a js file in locale that contains other attached json files. HOT 3
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 i18n-module.