mirror of
https://github.com/Bubka/2FAuth.git
synced 2025-06-19 19:28:08 +02:00
Fix error thrown on i18n setup
This commit is contained in:
parent
f6484bd73d
commit
a57baa9de9
5
resources/js_vue3/app.js
vendored
5
resources/js_vue3/app.js
vendored
@ -26,9 +26,12 @@ app.config.globalProperties.$2fauth = {
|
||||
app.use(createPinia())
|
||||
app.use(router)
|
||||
app.use(i18nVue, {
|
||||
lang: document.documentElement.lang.substring(0, 2),
|
||||
resolve: async lang => {
|
||||
const langs = import.meta.glob('../lang/*.json');
|
||||
return await langs[`../lang/${lang}.json`]();
|
||||
if (lang.includes('php_')) {
|
||||
return await langs[`../lang/${lang}.json`]();
|
||||
}
|
||||
}
|
||||
})
|
||||
app.use(Notifications)
|
||||
|
Loading…
x
Reference in New Issue
Block a user