xiCO2k / laravel-vue-i18n

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

Support for auto-loading vendor packages language paths #181

Open Haruki1707 opened 4 months ago

Haruki1707 commented 4 months 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.

xiCO2k commented 3 months ago

Hey @Haruki1707 really nice PR, can you create like a dummy repo for me to try that with some vendor languages?

Sorry for the delay on this.

Thanks.