nuxt-i18n: 6.15.4
nuxt: 2.14.7
i18n: {
locales: [{
code: 'he',
iso: 'he'
}
],
defaultLocale: 'he',
parsePages: false,
strategy: 'prefix',
pages: {
'categories/index': {
he: '/קטגוריות'
},
'categories/_id': {
he: '/קטגוריות/:id'
},
search: {
he: '/חיפוש'
}
}
}
```
The problem is when i reload the page it gives me Page Not Found.
because the routes in Hebrew, when i change the "he" values to be in english it works fine.
I think the none ascii characters make the problem
Try:
pages: {
about: {
en: "/about",
he: encodeURI("/קטגוריות")
}
}
The encodeURI part should be the fix for your issue. VueRouter even complains about it in the console if you don't use it so that should have been a hint.
As for adding about to the list also, I think this might be a bug in the module. It seems to be using he value if en is not specified. And if you are not using en at all then you can of course skip it.


We still have the same issue.
When we load the index page and then routing to /categoties or /search it working fine also in hebrew there is no problem
But if we reload the page at hebrew locale it gives us "This page could not be found"
If we reload the page at english locale it works fine.
so for example:
http://localhost:3000/en/categories => working
http://localhost:3000/he/קטגוריות => not working on refresh page
Why don't you provide a repro project and instead you are trying to make me reproduce your issue from screenshots? :)
You are correct brother, this is the best method.
https://github.com/AliAbuArab/nuxti18n-test.git
OK, I see that there is a problem but I'm not sure if it's related to this module as you can also reproduce some weird issues by just creating a page like קטגוריות.vue and disabling this module completely. Then reloading such page kinda works on SSR but then everything disappears on the client.
Yes we can change the directories name just to be in hebrew, but we want this app to support mainly three languages (hebrew, arabic and english).
What I'm saying is that the issue is likely in Nuxt or VueRouter since it reproduces without this module also.
got it.
thank you so much my friend, i will check that with VueRouter team.
@AliAbuArab
add "vue-router": "3.4.6" in package.json
it work for me.
I can confirm that v3.4.9 doesn't work while v3.4.8 does.
@posva Is this a known issue?
So 3.4.9 includes this change https://github.com/vuejs/vue-router/pull/3350 which seems to be intentionally breaking some cases.
I personally don't think it's OK to introduce breaking changes in a patch release...
@pi0 It seems like you are aware of this change and I suppose the issue mentioned in https://github.com/nuxt-community/i18n-module/issues/969#issuecomment-733667940 will be fixed in the next Nuxt release?
@rchl Indeed. Current workaround is that we pinned vue-router but still looking for a proper anti-regression :) https://github.com/nuxt/nuxt.js/pull/8325
Most helpful comment
@AliAbuArab
add "vue-router": "3.4.6" in package.json
it work for me.