{"repo":"xiCO2k/laravel-vue-i18n","free":true,"listed":false,"github":"https://github.com/xiCO2k/laravel-vue-i18n","clone":"git clone https://github.com/xiCO2k/laravel-vue-i18n.git","description":"Allows to connect your `Laravel` Framework translation files with `Vue`.","language":"TypeScript","stars":710,"topics":["javascript","vue","vuejs","vue3","laravel","laravel-framework","typescript"],"license":"MIT","category":"api-integrations-sdks","readme_excerpt":"Laravel Vue i18n laravel-vue-i18n is a Vue3 plugin that allows to connect your Laravel Framework translation files with Vue . It uses the same logic used on Laravel Localization . Installation With npm: or with yarn: Setup If you want to see a screencast on how to setup check out this video: How to use Laravel Vue i18n plugin. With Vite SSR (Server Side Rendering) For Server Side Rendering the resolve method should not receive a Promise and instead take advantage of the eager param like this: PHP Translations Available on Vue In order to load php translations, you can use this Vite plugin. Vite plugin options In addition to that, you can use this Vite plugin with additional paths to load from, this is usefull when you are using a package that let's you override your translations, or in case you are getting your application's lang files from different paths. Note that if one key found in two paths, priority will be given to the last given path between these two (In this example translation key will be loaded from public/locales ) During the npm run dev execution time, the plugin will create some files like this php {lang}.json on your lang folder. And to avoid that to be commited to your code base, I suggest to your .gitignore this like: With Webpack / Laravel Mix SSR (Server Side Rendering) For Server Side Rendering the resolve method should receive a require instead of a Promise : PHP Translations Available on Vue In order to load php translations, you can use this Mix plugi","default_branch":null,"files":null,"tree":[],"storefront":"/r/xiCO2k","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/xiCO2k/laravel-vue-i18n/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}