xiCO2k / laravel-vue-i18n

Allows to connect your `Laravel` Framework translation files with `Vue`.
MIT License
584 stars 49 forks source link

Support for auto-loading vendor packages language paths #181

Open Haruki1707 opened 2 weeks ago

Haruki1707 commented 2 weeks ago

This pull request introduces a feature to automatically load all language paths from vendor packages directly from the vendor folder without publishing them. Previously if you didn't want to publish the package lang files, the packages paths had to be manually specified in the additionalLangPaths option.

To maintain compatibility for those already adding the paths manually, this feature is disabled by default. It can be enabled by setting the loadPackagesLangPaths option to true in the Vite plugin options.

An added benefit of using this new feature is that the generated translation key will align with the key used by Laravel in PHP, offering a more consistent and streamlined approach.

Additionally, the README.md has been updated to include the new loadPackagesLangPaths option.