Code Monkey home page Code Monkey logo

Comments (5)

xiCO2k avatar xiCO2k commented on July 23, 2024 1

Do you have any .json lang files or only the .php lang files?

Thanks for the report btw.

from laravel-vue-i18n.

stevebauman avatar stevebauman commented on July 23, 2024

Thanks for the reply @xiCO2k! 🙏

Only traditional .php lang files, no .json lang files at all in this application 👍

from laravel-vue-i18n.

xiCO2k avatar xiCO2k commented on July 23, 2024

got it, will take a look on that case!

from laravel-vue-i18n.

xiCO2k avatar xiCO2k commented on July 23, 2024

Hey @stevebauman sorry for the delay on this.

I did a try on this repo: https://github.com/xiCO2k/laravel-vue-i18n-app and I did not got the error message.

Can you check if the error is still there, and if possible replicate on this repo?

Thanks

from laravel-vue-i18n.

paulelpidorou avatar paulelpidorou commented on July 23, 2024

Probably related to this, but i am getting a similar error when setting up using Laravel and Inertiajs

image

Translations still work but i get the error.

The app.js configuration

createInertiaApp({
    title: (title) => `${title} - ${appName}`,
    resolve: (name) => resolvePageComponent(`./Pages/${name}.vue`,
        import.meta.glob('./Pages/**/*.vue')),
    setup ({el, App, props, plugin}) {
        return createApp({render: () => h(App, props)}).
        use(plugin).
        use(ZiggyVue).
        use(vfm).
        use(i18nVue, {
            resolve: async lang => {
                const langs = import.meta.glob('../../lang/*.json');
                return langs[`../../lang/${lang}.json`]();
            }
        }).
        use(VueGoogleMaps, {
            load: {
                key: googleMapsApiKey,
            },
        }).
        mount(el);
    },
    progress: {
        color: '#4B5563',
    },
});

If I include a php_ prefix as @stevebauman mentions everything works and error goes away.

from laravel-vue-i18n.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.