Allows to connect your `Laravel` Framework translation files with `Vue`.

Overview

Laravel Vue i18n

GitHub Workflow Status (master) License Version Total Downloads

laravel-vue-i18n is a Vue3 plugin that allows to connect your Laravel Framework JSON translation files with Vue. It uses the same logic used on Laravel Localization.

Installation

With npm:

$ npm i laravel-vue-i18n

or with yarn:

$ yarn add laravel-vue-i18n

Usage

import { createApp } from 'vue'
import { i18nVue } from 'laravel-vue-i18n'

createApp()
    .use(i18nVue)
    .mount('#app');
<template>
    <div>
        <h1>{{ $t('Welcome :name!', { name: 'Francisco' }) }}. </h1>
        <div>Logged in {{ $tChoice('{1} :count minute ago|[2,*] :count minutes ago', 10) }}</div>
    </div>
</template>

Plugin Options

  • lang (optional): if not provided it will try to find from the <html lang="pt"> tag, if is not available it will default to en.
  • resolve (optional): The way to reach your language files.
createApp().use(i18nVue, {
    lang: 'pt',
    resolve: lang => import(`../lang/${lang}.json`),
})

trans(message: string, replacements: {})

The trans() method can translate a given message.

// lang/pt.json
{
    "Welcome!": "Bem-vindo!",
    "Welcome, :name!": "Bem-vindo, :name!",
}

import { trans } from 'laravel-vue-i18n';

trans('Welcome!'); // Bem-vindo!
trans('Welcome, :name!', { name: 'Francisco' }) // Bem-vindo Francisco!
trans('Welcome, :NAME!', { name: 'Francisco' }) // Bem-vindo FRANCISCO!

transChoice(message: string, count: number, replacements: {})

The transChoice() method can translate a given message based on a count, there is also available an trans_choice alias, and a mixin called $tChoice().

// lang/pt.json
{
    "There is one apple|There are many apples": "Existe uma maça|Existe muitas maças",
    "{0} There are none|[1,19] There are some|[20,*] There are many": "Não tem|Tem algumas|Tem muitas",
    "{1} :count minute ago|[2,*] :count minutes ago": "{1} há :count minuto|[2,*] há :count minutos",
}

import { transChoice } from 'laravel-vue-i18n';

transChoice('There is one apple|There are many apples', 1); // Existe uma maça
transChoice('{0} There are none|[1,19] There are some|[20,*] There are many', 19); // Tem algumas
transChoice('{1} :count minute ago|[2,*] :count minutes ago', 10); // Há 10 minutos.

loadLanguageAsync(lang: string)

The loadLanguageAsync() can be used to change the location during the runtime.

import { loadLanguageAsync } from 'laravel-vue-i18n';

<template>
    <div>{{ $t('Welcome!') }}</div>
    <button @click="loadLanguageAsync('pt')">Change to Portuguese Language</button>
</template>
Comments
  • Can't seem to get trans to work

    Can't seem to get trans to work

    I'm using Vue 3 with composition API and while $t and $tChoice both function perfectly, I can't seem to get trans or transChoice to function properly. It's as if it's using a different configuration from $t and $tChoice. Thus no language strings are loaded.

    It may just be a case of me doing something very wrong, as I work with Vue 2 daily and this is my first Vue 3 Composition API project.

    Just in case it's important, here's the app.js file that I use
    require('./bootstrap');
    
    import { createApp, h } from 'vue';
    import { createInertiaApp } from '@inertiajs/inertia-vue3';
    import { InertiaProgress } from '@inertiajs/progress';
    import { i18nVue } from 'laravel-vue-i18n';
    
    const appName = window.document.getElementsByTagName('title')[0]?.innerText || 'Laravel';
    
    createInertiaApp({
        title: (title) => `${title} - ${appName}`,
        resolve: (name) => require(`./Pages/${name}.vue`),
        setup({ el, app, props, plugin }) {
            return createApp({ render: () => h(app, props) })
                .use(plugin)
                .use(i18nVue, {
                  resolve: lang => import (`../lang/${lang}.json`),
                })
                .mixin({ methods: { route } })
                .mount(el);
        },
    });
    
    InertiaProgress.init({ color: '#4B5563' });
    
    bug 
    opened by AngelOD 41
  • Infinite laravel mix alert in run watch

    Infinite laravel mix alert in run watch

    Hi @xiCO2k , Thanks you for this helpful librairie.

    But i face some issues. I install the librairie with Laravel and Vue3, in combinaision with LaravelMix. When i launch npm run watch, i'm pop with a ton of Laravel Mix alert of successful compilation. I don't know why. Thanks

    bug 
    opened by Ulrich15 22
  • Cannot read properties of undefined (reading 'VITE_LARAVEL_VUE_I18N_HAS_PHP')

    Cannot read properties of undefined (reading 'VITE_LARAVEL_VUE_I18N_HAS_PHP')

    • laravel-vue-i18n - 2.1.1
    • vite - 2.9.9
    • vuejs 3.2.25
    • node 16.16.0
    • without laravel
    // .env
    
    VITE_LARAVEL_VUE_I18N_HAS_PHP=false
    
    // src/main.ts
    
    import { createApp } from 'vue'
    import { i18nVue } from 'laravel-vue-i18n'
    import i18nOptions from '@/utils/lang'
    
    import pinia from '@/utils/pinia'
    
    createApp(App)
        .use(i18nVue, i18nOptions(pinia))
    
    // src/utils/lang
    
    import { Pinia } from 'pinia'
    import { useSettingsStore } from '@/stores/settings'
    
    export default (pinia: Pinia) => {
        const lang = useSettingsStore(pinia).locale
    
        const resolve = async (lang: string) => {
            const files = import.meta.glob('../../lang/*.json')
    
            return await files[`../../lang/${ lang }.json`]()
        }
    
        return { lang, resolve }
    }
    

    image

    Result: not working

    image

    If we add output to the console, we see that the files are loaded:

    const resolve = async (lang: string) => {
        const files = import.meta.glob('../../lang/*.json')
    
        console.log(files)
        console.log(
            import.meta.env.VITE_API_URL,
            import.meta.env.VITE_LARAVEL_VUE_I18N_HAS_PHP
        )
    
        return await files[`../../lang/${ lang }.json`]()
    }
    

    image

    image

    Without the VITE_LARAVEL_VUE_I18N_HAS_PHP key, I also get the error:

    image

    Version 1.4.4 worked perfectly.

    bug more info needed 
    opened by andrey-helldar 19
  • Translation not showing on initial app launch

    Translation not showing on initial app launch

    Hi,

    We recently updated our project to use vite instead of webpack and also modified also our vuejs files to make it compatible, everything is working well except for one thing. Yesterday I noticed that the requested translations did not load on the first load of the project when you refresh or visit the website.

    For example when I put the url in my webbrowser and visit it, the translations will be in English but if I click on 1 menu item to go to another page, everything will change to the Dutch translations (which is correct).

    Our app.js is as follows:

    import './bootstrap';
    import '../css/app.css';
    
    // Import modules...
    import { createApp, h } from 'vue';
    import { createInertiaApp } from '@inertiajs/inertia-vue3'
    import { InertiaProgress } from '@inertiajs/progress'
    import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome";
    import { library } from "@fortawesome/fontawesome-svg-core";
    import { faInfoCircle } from "@fortawesome/free-solid-svg-icons";
    import { faEdit } from "@fortawesome/free-solid-svg-icons";
    import { faEye } from "@fortawesome/free-solid-svg-icons";
    import { faSun } from "@fortawesome/free-solid-svg-icons";
    import { resolvePageComponent } from 'laravel-vite-plugin/inertia-helpers';
    import { i18nVue } from 'laravel-vue-i18n';
    
    library.add(faInfoCircle);
    library.add(faEdit);
    library.add(faEye);
    library.add(faSun);
    
      createInertiaApp({
          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(i18nVue, {
                      resolve: async lang => {
                          const langs = import.meta.glob('../../lang/*.json');
                          return await langs[`../../lang/${lang}.json`]();
                      }
                  })
                  .mixin({ methods: { route, hasAnyPermission: function (permissions) {
                          var allPermissions = this.$page.props.auth.can;
                          var hasPermission = false;
    
                          permissions.forEach(function(item){
                              if(allPermissions[item]) hasPermission = true;
                          });
                          return hasPermission;
                      } } })
                  .mixin({ methods: { route } })
                  .component("font-awesome-icon", FontAwesomeIcon)
                  .mount(el);
          },
      });
    

    and in our vuejs files we use {{ $t('translation') }} to load the translations for a specific text, what can be the reason that the translation only load when you navigate to another page?

    bug 
    opened by iMaBo 18
  • TypeError: langs[((

    TypeError: langs[(("../../lang/" + (intermediate value)) + ".json")] is not a function

    Hi,

    I've tried installing this package and followed the documentation for Vite, but I'm getting the following error in the console.

    Uncaught (in promise) TypeError: langs[(("../../lang/" + (intermediate value)) + ".json")] is not a function
    

    I am getting this on a fresh installation of Laravel Jetstream and the installation of this package

    laravel new example --jet 
    
    npm i laravel-vue-i18n
    

    vite.config.js

    import { defineConfig } from "vite";
    import laravel from "laravel-vite-plugin";
    import vue from "@vitejs/plugin-vue";
    import i18n from "laravel-vue-i18n/vite";
    
    export default defineConfig({
        plugins: [
            laravel({
                input: "resources/js/app.js",
                refresh: true,
            }),
            vue({
                template: {
                    transformAssetUrls: {
                        base: null,
                        includeAbsolute: false,
                    },
                },
            }),
            i18n(),
        ],
    });
    

    app.json

    import "./bootstrap";
    import "../css/app.css";
    
    import { createApp, h } from "vue";
    import { createInertiaApp } from "@inertiajs/inertia-vue3";
    import { InertiaProgress } from "@inertiajs/progress";
    import { resolvePageComponent } from "laravel-vite-plugin/inertia-helpers";
    import { ZiggyVue } from "../../vendor/tightenco/ziggy/dist/vue.m";
    import { i18nVue } from "laravel-vue-i18n";
    
    const appName =
        window.document.getElementsByTagName("title")[0]?.innerText || "Laravel";
    
    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(i18nVue, {
                    resolve: async (lang) => {
                        const langs = import.meta.glob("../../lang/*.json");
                        return await langs[`../../lang/${lang}.json`]();
                    },
                })
                .use(plugin)
                .use(ZiggyVue, Ziggy)
                .mount(el);
        },
    });
    
    InertiaProgress.init({ color: "#4B5563" });
    

    Am I stupid and am I forgetting something or is something not working properly ?

    opened by EdgedSheet 12
  • Console error in Firefox

    Console error in Firefox

    Hi, I'm getting the following error when on Firefox. No issues on Chrome

    Uncaught (in promise) TypeError: langs[(("../../lang/" + (intermediate value)) + ".json")] is not a function

    image

    more info needed 
    opened by xiki808 11
  • vite: module does not provide an export named 'i18nVue'

    vite: module does not provide an export named 'i18nVue'

    Also: after upgrade from 0.2.1 to 0.4.1:

    Uncaught SyntaxError: The requested module '/node_modules/.vite/laravel-vue-i18n.js?v=4bc78461' does not provide an export named 'i18nVue'

    This happened with v3 also, rolling back to 0.2.1 it works again.

    Originally posted by @ibrunotome in https://github.com/xiCO2k/laravel-vue-i18n/issues/3#issuecomment-1008974849

    bug 
    opened by xiCO2k 10
  • Translation not working when using v1.4.4 or v2.0.0

    Translation not working when using v1.4.4 or v2.0.0

    I can't get translation to work using latest two releases of this package (v1.4.4 or v2.0.0), but v1.4.3 does seems work with the setup below.

    When using v1.4.4 and v2.0.0, the $t() function does not translate the given string and the isLoaded function always returns false, but if I replace either of those versions with v1.4.3, then the isLaoded function returns true and translation works.

    There are no errors raised and I can see the generated translation files gets fetched when loading my application in the browser.

    webpack.mix.js

    const mix = require('laravel-mix');
    require('laravel-vue-i18n/mix');
    
    mix.js('resources/js/app.js', 'public/js').vue()
        .i18n()
        .sass('resources/sass/app.scss', 'public/css')
        .sourceMaps()
        .webpackConfig(require('./webpack.config'));
    
    if (mix.inProduction()) {
        mix.version();
    }
    

    app.js

    require('./bootstrap');
    
    // Import modules...
    import { createApp, h } from 'vue';
    import { createInertiaApp } from '@inertiajs/inertia-vue3';
    import { InertiaProgress } from '@inertiajs/progress';
    import { i18nVue } from 'laravel-vue-i18n';
    import dayjs from 'dayjs'
    import relativeTime from 'dayjs/plugin/relativeTime';
    import localizedFormat from 'dayjs/plugin/localizedFormat';
    import 'dayjs/locale/en-gb'
    
    const appName = window.document.getElementsByTagName('title')[0]?.innerText || 'Laravel';
    
    createInertiaApp({
        title: (title) => `${title} - ${appName}`,
        resolve: (name) => require(`./Pages/${name}.vue`),
        setup({ el, app, props, plugin }) {
    
            dayjs.extend(relativeTime);
            dayjs.extend(localizedFormat);
            dayjs.locale('en-gb');
    
            const VueApp = createApp({ render: () => h(app, props) });
    
            VueApp.config.globalProperties.$_ = _;
    
            VueApp.config.globalProperties.$dayjs = dayjs;
    
            VueApp.config.globalProperties.$filters = {
                truncate(text, length, clamp){
                    clamp = clamp || '...';
                    var node = document.createElement('div');
                    node.innerHTML = text;
                    var content = node.textContent;
                    return content.length > length ? content.slice(0, length) + clamp : content;
                }
            }
    
            VueApp.use(plugin)
                .use(i18nVue, {
                    resolve: lang => import(`../../lang/${lang}.json`),
                })
                .mixin({ methods: { route } })
                .mount(el);
    
            return VueApp;
        },
    });
    
    InertiaProgress.init({ color: '#4B5563' });
    
    more info needed 
    opened by ipimpat 7
  • Cannot load language files

    Cannot load language files

    Hello,

    Why I get the following error?

    GET http://***.com/js/resources_lang_hu_json.js net::ERR_ABORTED 404 (Not Found)
    Uncaught (in promise) TypeError: Cannot load lang: hu file: Loading chunk resources_lang_hu_json failed.
    

    The resources/lang/en.json file exists.

    opened by davidtovt 7
  • Can't seem to get the translations working

    Can't seem to get the translations working

    Hi!

    I can't get this package to work on my project for some reason. I mean, it works, but it doesn't really load translations from my .json file.

    This is what my /resources/js/admin/index.js looks like. Notice the console log in resolve function which doesn't output anything to the console.

    import { i18nVue } from "craftable-pro/plugins/laravel-vue-i18n";
    
    ...
    
    createInertiaApp({
        title: (title) => `${title} - ${appName}`,
        resolve: async (name) => {
            ...
        },
        // @ts-ignore
        setup({ el, app, props, plugin }) {
            return createApp({ render: () => h(app, props) })
                .use(plugin)
                .use(i18nVue, {
                    resolve: async (lang) => {
                        const langs = import.meta.glob("../../../*.json");
    
                        // This doesn't provide any output to console
                        console.log("foo");
    
                        return await langs[`../../../${lang}.json`]();
                    },
                })
                ...
                .mount(el);
        },
    });
    

    And this is how my /lang/en.json looks like:

    {
        "prefix.Media": "Media translated",
    }
    

    However, when I try to get the translation for key prefix.Media I get the key back, like there is no translated string present.

    <script setup lang="ts">
    ...
    const lang = getActiveLanguage();
    const loaded = isLoaded();
    
    console.log(lang, loaded, trans("prefix.Media"));
    </script>
    

    image

    I'm using InertiaJS with Vite, this is my config:

    import { defineConfig } from "vite";
    import laravel from "laravel-vite-plugin";
    import vue from "@vitejs/plugin-vue";
    const path = require("path");
    
    export default defineConfig({
        plugins: [
            laravel({
                input: [
                    "resources/css/app.css",
                    "resources/js/app.js",
                    "resources/js/admin/index.ts",
                ],
                refresh: true,
            }),
            vue({
                template: {
                    transformAssetUrls: {
                        base: null,
                        includeAbsolute: false,
                    },
                },
            }),
        ],
        resolve: {
            alias: {
                "@": path.resolve(__dirname, "./resources/js"),
                ziggy: path.resolve(__dirname, "./vendor/tightenco/ziggy"),
            },
        },
    });
    

    Do you by any chance know where might be the problem? Or did I missunderstand something in the docs?

    Thanks in advance!

    bug 
    opened by timoransky 6
  • "npm run build" is slower than "npm run dev"

    Hello, first of all sorry for my English, I use google translate.

    When I use "npm run dev", the translation process is done quickly without any problems, but when I do "npm run build", the file "php_tr.32683819.js" loads quite late depending on the internet speed. This causes "keys" to appear in the first opening of the page.

    resim_2022-09-10_000114141

    As seen in the picture, "php_tr.32683819.js" file is loaded 2000ms after the page is opened.

    image

    Dependencies "laravel-vue-i18n": "^2.2.2", "vite": "^3.0.0", "vue": "^3.2.31"

    Laravel 9+

    vite.config.js
    import { defineConfig } from 'vite';
    import laravel from 'laravel-vite-plugin';
    import vue from '@vitejs/plugin-vue';
    import i18n from 'laravel-vue-i18n/vite';
    
    
    export default defineConfig({
    
        plugins: [
            laravel({
                input: 'resources/js/app.js',
                refresh: true,
            }),
            vue({
                template: {
                    transformAssetUrls: {
                        base: null,
                        includeAbsolute: false,
                    },
                },
            }),
            i18n(),
        ],
    });
    
    
    app.js
    createInertiaApp({
        title: (title) => `${title} - ${appName}`,
        resolve: (name) => resolvePageComponent(`./Pages/${name}.vue`, import.meta.glob('./Pages/**/*.vue')),
        setup({ el, app, props, plugin }) {
            const captcheKey = props.initialPage.props.recaptcha_site_key;
            const application = createApp({ render: () => h(app, props) })
                .use(plugin)
                .use(i18nVue, {
                    resolve: async lang => {
                        const langs = import.meta.glob('../../lang/*.json');
                        return await langs[`../../lang/${lang}.json`]();
                    }
                })
        ...
    
    opened by muhammedkaraoglu 6
  • Translations not working inside layout (App.vue)

    Translations not working inside layout (App.vue)

    Hello @xiCO2k, Great package! It works really well, I have been using it for my upcoming project and it's been a breeze. Though I am running into a weird issue that I'm not sure how to solve. Translations don't seem to be working inside a layout (including nested components within). Everything inside the <slot /> seems to work perfectly. I have a feeling it's something to do with how I am using layouts with Inertia.

    <!-- other relevant imports -->
    import { i18nVue } from "laravel-vue-i18n";
    
    createInertiaApp({
        resolve: (name) => {
            const page = resolvePageComponent(`./Pages/${name}.vue`, import.meta.glob("./Pages/**/*.vue"));
    
            page.then((module) => {
                module.default.layout = module.default.layout || BaseLayout;
            });
    
            return page;
        },
    
        title: (title) => (title ? `${title} - App Name` : "App Name"),
    
        setup({ el, App, props, plugin }) {
            createApp({ render: () => h(App, props) })
                .mixin({ methods: { route } })
                .use(plugin)
                .use(i18nVue, {
                    lang: "fi",
                    resolve: async (lang) => {
                        const langs = import.meta.glob("../../lang/*.json");
    
                        return await langs[`../../lang/${lang}.json`]();
                    },
                })
                .mount(el);
        },
    });
    

    The same translations that work elsewhere don't work here.

    My App.vue just contains the usual boilerplate code (nav, global search, etc) so I won't paste it here.

    <!-- lots of boilerplate code -->
    <slot />
    

    What's weird is that for pages that use the default layout (Base.vue), the translations work just fine.

    I did some more digging... Could it be related to the workaround?

    <script>
        import AppLayout from "@/Shared/Layouts/App.vue";
    
        export default {
            layout: AppLayout,
        };
    </script>
    <script setup>
    ...
    

    https://github.com/inertiajs/inertia/discussions/651

    Maybe you could give some light on this.

    opened by HazJ 2
  • Multiple occurrences of variable

    Multiple occurrences of variable

    I have a string with for example,

    Do you really want to block :name. After this :name won't be able to message you.

    First occurrence of :name is translated, second is not.

    I used it in the following sentence:

    'Weet je zeker dat je :name wilt deblokkeren? :name kan dan weer berichten sturen.'

    Results in the following:

    Weet je zeker dat je adsasd wilt deblokkeren? :name kan dan weer berichten sturen.

    Thanks for the great plugin!

    enhancement good first issue 
    opened by slashforward-nl 1
  • FallbackLocale not working

    FallbackLocale not working

    The FallbackLocale option is not working correctly.

    // config/app.php
    'locale' => 'de',
    
     'fallback_locale' => 'en',
    
    // resources/lang/en/app.php
    return [
    
        'jetstream' => [
    
            'Forgot Password' => 'Forgot Password',
            'Two-factor Confirmation' => 'Two-factor Confirmation',
            'Email Verification' => 'Email Verification',
    
        ],
    
    ];
    
    // resources/lang/de/app.php
    <?php
    
    return [
    
        'jetstream' => [
    
            // 'Forgot Password' => 'Passwort vergessen',
            'Two-factor Confirmation' => 'Zwei-Faktor-Authentifizierung',
            'Email Verification' => 'E-Mail-Verifizierung',
    
        ],
    
    ];
    
    // resources/js/app.js
    .use(i18nVue, {
        lang: 'de',
        fallbackLang: 'en',
        resolve: async lang => {
            const langs = import.meta.glob('../lang/*.json');
            return await langs[`../lang/${lang}.json`]();
        }
    })
    

    I would expect the trans function to use the fallbackLocale. Instead it echoes out the translation string.

    // 'Forgot Password' is set in de/app.php, locale = 'de', fallbackLocale = 'en'
    console.log(trans('app.jetstream.Forgot Password')); // -> Passwort vergessen
    
    // 'Forgot Password' is not set in de/app.php, locale = 'de', fallbackLocale = 'en'
    console.log(trans('app.jetstream.Forgot Password')); // -> app.jetstream.Forgot Password
    
    bug 
    opened by Quadrubo 1
  • Cannot find module './en.json'

    Cannot find module './en.json'

    Hi Francisco,

    I can't get the package to work with PHP files.

    I followed these steps (no SSR): https://github.com/xiCO2k/laravel-vue-i18n#with-webpack--laravel-mix

    The console says this: Unhandled Promise Rejection: Error: Cannot find module './en.json'.

    The file /public/js/lang_php_en_json.js exists.

    Also is resolving as instructed in app.js correct? The file ../../lang/${lang}.json does not exist. In ../../lang/en/ are my PHP translation files. No json file.

    Any idea what to do?

    bug 
    opened by yoeriboven 4
  • Support for Laravel Modules

    Support for Laravel Modules

    Hi, my project uses the Laravel Modules package (https://github.com/nWidart/laravel-modules) which allows you to separates logic in different modules. This means that every module has its own lang files.

    The problem is that it is not possible to specify more than one folder for PHP files in the Vite plugin.

    export default function i18n(langPath: string = 'lang')
    

    It would be perfect if it accepts an array of LangPaths in order to process more than one folder.

    Is this a possible change?

    enhancement good first issue 
    opened by quelo83 3
Releases(v2.3.1)
  • v2.3.1(Dec 14, 2022)

    What's Changed

    • Format Valid JSON - Removed trailing comma by @tfevan in https://github.com/xiCO2k/laravel-vue-i18n/pull/81
    • fix: Nested translations aren't translated by @Majkie in https://github.com/xiCO2k/laravel-vue-i18n/pull/88

    New Contributors

    • @tfevan made their first contribution in https://github.com/xiCO2k/laravel-vue-i18n/pull/81
    • @Majkie made their first contribution in https://github.com/xiCO2k/laravel-vue-i18n/pull/88

    Full Changelog: https://github.com/xiCO2k/laravel-vue-i18n/compare/v2.3.0...v2.3.1

    Source code(tar.gz)
    Source code(zip)
  • v2.3.0(Oct 9, 2022)

    What's Changed

    • Fix typo in calling i18n with langPath in README by @kitro in https://github.com/xiCO2k/laravel-vue-i18n/pull/67
    • Added onLoad Option which is called after language is loaded. by @markdegrootnl in https://github.com/xiCO2k/laravel-vue-i18n/pull/70
    • feat: add support for language arrays by @REJack in https://github.com/xiCO2k/laravel-vue-i18n/pull/73

    New Contributors

    • @kitro made their first contribution in https://github.com/xiCO2k/laravel-vue-i18n/pull/67
    • @markdegrootnl made their first contribution in https://github.com/xiCO2k/laravel-vue-i18n/pull/70
    • @REJack made their first contribution in https://github.com/xiCO2k/laravel-vue-i18n/pull/73

    Full Changelog: https://github.com/xiCO2k/laravel-vue-i18n/compare/v2.2.2...v2.3.0

    Source code(tar.gz)
    Source code(zip)
  • v2.2.1(Sep 8, 2022)

    What's Changed

    • fix: Force load language on vue install for the shared instance. by @xiCO2k in https://github.com/xiCO2k/laravel-vue-i18n/pull/63

    Full Changelog: https://github.com/xiCO2k/laravel-vue-i18n/compare/v2.2.0...v2.2.1

    Source code(tar.gz)
    Source code(zip)
  • v2.2.0(Sep 7, 2022)

    What's Changed

    • Missed comma in translation for vue template by @homcenco in https://github.com/xiCO2k/laravel-vue-i18n/pull/60
    • Refactor to class instance, allowing multiple instances by @ragulka in https://github.com/xiCO2k/laravel-vue-i18n/pull/59

    New Contributors

    • @homcenco made their first contribution in https://github.com/xiCO2k/laravel-vue-i18n/pull/60
    • @ragulka made their first contribution in https://github.com/xiCO2k/laravel-vue-i18n/pull/59

    Full Changelog: https://github.com/xiCO2k/laravel-vue-i18n/compare/v2.1.3...v2.2.0

    Source code(tar.gz)
    Source code(zip)
  • v2.1.3(Jul 27, 2022)

    What's Changed

    • Reapply fix for VITE_LARAVEL_VUE_I18N_HAS_PHP error by @andreiio in https://github.com/xiCO2k/laravel-vue-i18n/pull/52

    New Contributors

    • @andreiio made their first contribution in https://github.com/xiCO2k/laravel-vue-i18n/pull/52

    Full Changelog: https://github.com/xiCO2k/laravel-vue-i18n/compare/v2.1.2...v2.1.3

    Source code(tar.gz)
    Source code(zip)
  • v2.1.2(Jul 24, 2022)

    What's Changed

    • Fix for Cannot read properties of undefined (VITE_LARAVEL_VUE_I18N_HAS_PHP) by @andrey-helldar in https://github.com/xiCO2k/laravel-vue-i18n/pull/50

    New Contributors

    • @andrey-helldar made their first contribution in https://github.com/xiCO2k/laravel-vue-i18n/pull/50

    Full Changelog: https://github.com/xiCO2k/laravel-vue-i18n/compare/v2.1.1...v2.1.2

    Source code(tar.gz)
    Source code(zip)
  • v2.1.1(Jul 19, 2022)

    What's Changed

    • fix: Add support for CommonJS Builds by @xiCO2k in https://github.com/xiCO2k/laravel-vue-i18n/pull/46

    Full Changelog: https://github.com/xiCO2k/laravel-vue-i18n/compare/v2.1.0...v2.1.1

    Source code(tar.gz)
    Source code(zip)
  • v2.1.0(Jul 12, 2022)

    What's Changed

    • Support for subdirectories in a language by @tomcoonen in https://github.com/xiCO2k/laravel-vue-i18n/pull/44

    New Contributors

    • @tomcoonen made their first contribution in https://github.com/xiCO2k/laravel-vue-i18n/pull/44

    Full Changelog: https://github.com/xiCO2k/laravel-vue-i18n/compare/v2.0.1...v2.1.0

    Source code(tar.gz)
    Source code(zip)
  • v2.0.1(Jul 8, 2022)

  • v2.0.0(Jul 6, 2022)

    What's Changed

    • feat: Add vite plugin to get the php translation files. by @xiCO2k in https://github.com/xiCO2k/laravel-vue-i18n/pull/37
    • feat: Add fallbackLang option by @xiCO2k in https://github.com/xiCO2k/laravel-vue-i18n/pull/38
    • fix: Ignore not lang folders. by @xiCO2k in https://github.com/xiCO2k/laravel-vue-i18n/pull/39

    Full Changelog: https://github.com/xiCO2k/laravel-vue-i18n/compare/v1.4.4...v2.0.0

    Source code(tar.gz)
    Source code(zip)
  • v1.4.4(Jun 24, 2022)

    What's Changed

    • Update README.md by @yoeriboven in https://github.com/xiCO2k/laravel-vue-i18n/pull/29
    • Improve RegExp to support dash langs like pt-PT in https://github.com/xiCO2k/laravel-vue-i18n/commit/909305d095e24efeb10c5c7dcf55e9ed49849f50

    New Contributors

    • @yoeriboven made their first contribution in https://github.com/xiCO2k/laravel-vue-i18n/pull/29

    Full Changelog: https://github.com/xiCO2k/laravel-vue-i18n/compare/v1.4.3...v1.4.4

    Source code(tar.gz)
    Source code(zip)
  • v1.4.3(Apr 25, 2022)

    What's Changed

    • Update README.md by @alexandrpeters in https://github.com/xiCO2k/laravel-vue-i18n/pull/22
    • fix: Concatenation in PHP language files causes error in loader by @rafalglowacz in https://github.com/xiCO2k/laravel-vue-i18n/pull/25

    New Contributors

    • @alexandrpeters made their first contribution in https://github.com/xiCO2k/laravel-vue-i18n/pull/22
    • @rafalglowacz made their first contribution in https://github.com/xiCO2k/laravel-vue-i18n/pull/25

    Full Changelog: https://github.com/xiCO2k/laravel-vue-i18n/compare/v1.4.2...v1.4.3

    Source code(tar.gz)
    Source code(zip)
  • v1.4.2(Mar 24, 2022)

    What's Changed

    • fix: Add failsafe if there is no php files or json files. by @xiCO2k in https://github.com/xiCO2k/laravel-vue-i18n/pull/21

    Full Changelog: https://github.com/xiCO2k/laravel-vue-i18n/compare/v1.4.1...v1.4.2

    Source code(tar.gz)
    Source code(zip)
  • v1.4.1(Mar 23, 2022)

  • v1.4.0(Mar 23, 2022)

    What's Changed

    • Add Laravel Mix Plugin by @xiCO2k in https://github.com/xiCO2k/laravel-vue-i18n/pull/20

    Full Changelog: https://github.com/xiCO2k/laravel-vue-i18n/compare/v1.3.1...v1.4.0

    Source code(tar.gz)
    Source code(zip)
  • v1.3.1(Mar 12, 2022)

    What's Changed

    • Resolve will handle require, object or Promise by @xiCO2k in https://github.com/xiCO2k/laravel-vue-i18n/pull/19

    Full Changelog: https://github.com/xiCO2k/laravel-vue-i18n/compare/v1.2.0...v1.3.1

    Source code(tar.gz)
    Source code(zip)
  • v1.2.0(Jan 31, 2022)

    What's Changed

    • add new wTrans and wTransChoice by @A-Ghorab in https://github.com/xiCO2k/laravel-vue-i18n/pull/13

    Full Changelog: https://github.com/xiCO2k/laravel-vue-i18n/compare/v1.1.0...v1.2.0

    Source code(tar.gz)
    Source code(zip)
  • v1.1.0(Jan 29, 2022)

    What's Changed

    • Add isLoaded Function by @A-Ghorab in https://github.com/xiCO2k/laravel-vue-i18n/pull/12

    New Contributors

    • @A-Ghorab made their first contribution in https://github.com/xiCO2k/laravel-vue-i18n/pull/12

    Full Changelog: https://github.com/xiCO2k/laravel-vue-i18n/compare/v1.0.2...v1.1.0

    Source code(tar.gz)
    Source code(zip)
  • v1.0.2(Jan 27, 2022)

    What's Changed

    • Fix: make sure to use hyphen on lang attribute by @ckyoung in https://github.com/xiCO2k/laravel-vue-i18n/pull/11

    New Contributors

    • @ckyoung made their first contribution in https://github.com/xiCO2k/laravel-vue-i18n/pull/11

    Full Changelog: https://github.com/xiCO2k/laravel-vue-i18n/compare/v1.0.1...v1.0.2

    Source code(tar.gz)
    Source code(zip)
  • v1.0.1(Jan 26, 2022)

    What's Changed

    • Changed HTML language Attribute by @NaincyKumariKnoldus in https://github.com/xiCO2k/laravel-vue-i18n/pull/10

    New Contributors

    • @NaincyKumariKnoldus made their first contribution in https://github.com/xiCO2k/laravel-vue-i18n/pull/10

    Full Changelog: https://github.com/xiCO2k/laravel-vue-i18n/compare/v1.0.0...v1.0.1

    Source code(tar.gz)
    Source code(zip)
  • v1.0.0(Jan 18, 2022)

    What's Changed

    • feat: Add Support to Laravel 9 by @xiCO2k in https://github.com/xiCO2k/laravel-vue-i18n/pull/7

    Full Changelog: https://github.com/xiCO2k/laravel-vue-i18n/compare/v0.5.0...v1.0.0

    Source code(tar.gz)
    Source code(zip)
  • v0.5.0(Jan 11, 2022)

    What's Changed

    • feat: Add SSR Support by @xiCO2k in https://github.com/xiCO2k/laravel-vue-i18n/pull/5

    Full Changelog: https://github.com/xiCO2k/laravel-vue-i18n/compare/v0.4.2...v0.5.0

    Source code(tar.gz)
    Source code(zip)
  • v0.4.1(Jan 9, 2022)

    Full Changelog: https://github.com/xiCO2k/laravel-vue-i18n/compare/v0.4.0...v0.4.1

    Fixed

    • Replace dash with an underscore on default lang to allow the correct convention used on Laravel.
    Source code(tar.gz)
    Source code(zip)
  • v0.4.0(Dec 11, 2021)

  • v0.3.0(Nov 23, 2021)

    Full Changelog: https://github.com/xiCO2k/laravel-vue-i18n/compare/v0.2.1...v0.3.0

    New Features

    • Add defaultResolver, to find the resources/lang by default.
    Source code(tar.gz)
    Source code(zip)
  • v0.2.1(Nov 19, 2021)

  • v0.1.0(Nov 18, 2021)

Owner
Francisco Madeira
Hello World 👋
Francisco Madeira
Initial template to start your awesome Laravel, Tailwind and Vue projects

Features Laravel 8.* Tailwind 2.1 Ready and Loaded @tailwindcss/typography @tailwindcss/forms Dark mode ready All variants enabled by default Vue 2, V

Marc Garcia Torrent 19 Jul 19, 2022
Laravel Vue SPA, Bulma themed. For demo login use `[email protected]` & `password` -

Laravel Enso Hit the ground running when building your new Laravel SPA project with boilerplate and extra functionality out of the box! click on the p

Laravel Enso 1k Jan 3, 2023
High scalable boilerplate for Laravel - Vue using laravel-mix.

Why use this ? This boilerplate make developer easier to make monolith Laravel project which integrated with Vue.js and vue-router as default front-en

Carvel Saputra Martaloho 5 Sep 21, 2022
Laravel Vue SPA, Bulma themed. For demo login use `[email protected]` & `password` -

Laravel Enso Hit the ground running when building your new Laravel SPA project with boilerplate and extra functionality out of the box! click on the p

Laravel Enso 1k Jan 3, 2023
Laravel Starter With Laravel, Vite, Vue 2, Inertia.js, Ziggy

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

Oskars Germovs 1 Oct 29, 2021
Laravel Starter With Laravel, Vite, Vue 2, Inertia.js, Ziggy, Typescript

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

Oskars Germovs 1 Oct 29, 2021
:elephant: A Laravel 6 SPA boilerplate with a users CRUD using Vue.js 2.6, GraphQL, Bootstrap 4, TypeScript, Sass, and Pug.

Laravel Vue Boilerplate A Laravel 6 Single Page Application boilerplate using Vue.js 2.6, GraphQL, Bootstrap 4, TypeScript, Sass and Pug with: A users

Alefe Souza 533 Jan 3, 2023
Laravel and Vue js CRUD

Laravel and Vue js PhoneBook app In this project I have done a simple CRUD using Laravel and Vue Js. Here I have used : Vue router Sweetalert2 Resourc

AR Shahin 4 Jun 11, 2022
A Laravel 8 and Vue 3 SPA boilerplate using tailwind styling and sanctum for authentication :ghost:

Laravel Vue Sanctum SPA Laravel and vue spa using tailwind (laravel/ui looks) for styling and sanctum for authentification Features Laravel 8 Vue + Vu

Hijen EL Khalifi 62 Dec 5, 2022
Starterkits Project With Laravel + Inertia JS + Vue + Vuetify

Laravel InertiaJS Vuetify A laravel inertiajs vuetify starterkit Demo You can access demo app in : https://laravel-inertia-vuetify.herokuapp.com/ Feat

Ahmad Faiz Kamaludin 21 Dec 16, 2022
This is a Starter Laravel 8 project with Vue 3 and Bootstrap 5 installed for you.

Laravel8-Vue3-Bootstrap5 This is a Starter Laravel 8 project with Vue 3 and Bootstrap 5. Instalation Guide: As always you need to: composer install Th

Mohamed Hafidi 7 Oct 19, 2022
Laravel backend Inertia and Vue starter template

Inertia.js - Vue.js ve Laravel Starter Template Yunus Emre Altanay If you want to make a single page application using laravel infrastructure. This re

Yunus Emre Altanay 3 Oct 21, 2021
Clone do instagram utilizando Laravel, Vue, Inertia, Tailwind

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

Bortolin Furlanetto 1 Jan 3, 2022
A new blog system based on laravel+vue

Lumen PHP Framework Laravel Lumen is a stunningly fast PHP micro-framework for building web applications with expressive, elegant syntax. We believe d

white 14 Nov 4, 2022
How to Create Laravel 8 Vue JS CRUD Example

About Project How to Create Laravel 8 Vue JS CRUD, how to implement vue js crud example with Laravel 8. how to Create a crude API in Laravel 8, for ex

Fadi Mathlouthi 1 Oct 22, 2021
A Laravel-Vue-Tailwind SAAS Starter Kit.

Super SAAS Template My name is Julien Nahum, I've founded multiple Software-As-A-Service companies. This repo is the base I'm using to create a new SA

Julien Nahum 16 Dec 23, 2022
A Laravel-Vue SPA starter kit.

Laravel-Vue SPA A Laravel-Vue SPA starter kit. Features Laravel 8 Vue + VueRouter + Vuex + VueI18n + ESlint Pages with dynamic import and custom layou

Cretu Eusebiu 3k Jan 6, 2023
The source code behind the Laracasts Series: Image Uploading with Vue + Laravel

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

Andrew Schmelyun 5 Dec 10, 2022
A simple boilerplate for Laravel + Vue with authentication through Sanctum/Fortify

About this boilerplate Basic boilerplate to quickly and easy get started with a Laravel API and a Vue SPA frontend. Nothing has been done, so everythi

ikoncept 1 Dec 2, 2021