Open TymoteuszNachtman opened 4 days ago
I managed to resolve this using 'en-GB' instead of 'en'. Still 'en' doesn't load for some reason.
Hovewer fallback doesn't work - it tries to use default 'en' fallback even though I specified fallbackLang: 'pl'
in i18nVue options. But now on '/login' page 'pl' is not loading strings in i18n instance.
{
"lang": "pl",
"messages": {}
}
After some testing it seems like there is an issue with loading fallbackLang. I manually changed it to 'pl' inside the package and now it doesn't load 'pl' but 'en' works great... So whatever language is set as default fallback language it won't load in this case.
Thanks for the issue, I will investigate!
Also if you want you can create a PR I would love to review that!
Thanks
Hi, in my Laravel 11 with InertiaJS and Vue 3 app the translations (laravel-vue-i18n v.2.7.7) don't load on certain pages. However default 'pl' language is loading perfectly on this pages.
In my example I'm comparing
/dashboard
(component: /Pages/Dashboard.vue) and/testing
(component: /Pages/Testing/MainPage.vue) routes. Both are vue components with nested, persistent layouts:On the
/dashboard
route every language is loaded. On the/testing
route hovewer only 'pl' language is loaded. I have aconsole.log()
in laravel-vue-i18n resolve, wchich doesn't show up at all on the/testing
route when loading 'en'.When I access the
/testing
route from Dashboard as Inertia<Link>
and have some other language than 'pl', the languages are working fine. But after page refresh I see only translation keys in 'en' (other langs however work fine but not in the persistent layouts). Another strange events:/testing
route to 'pl' everything is translated,/testing
but on/dashboard
it is logging.My
app.js
:vite.config.js
:I already checked this issues:
85 - I'm already searching in
lang
folder93 - wchich then results in app errors and components not rendering
136 - wchich is the closest case to mine, still not resolved for 'en' language somehow
187 - wchich helped with flashing keys, thanks for that :)
Maybe this is Inertia persistent layouts and page resolving issue, or maybe something with translations resolving. I'm confused right now 🤷♂️🙇♂️