xiCO2k / laravel-vue-i18n

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

New option to exclude framework translations #186

Closed thanosalexandris closed 1 week ago

thanosalexandris commented 1 month ago

Hey there. Could it be easy to add an extra option in src/interfaces/plugin-options.ts like this

excludeFrameworkTranslations: boolean,

and then in src/vite.ts to change it into

const excludeFrameworkTranslations = typeof options === 'string' ? options === 'lang' : options.excludeFrameworkTranslations ?? true
const frameworkLangPath = excludeFrameworkTranslations ? '' : 'vendor/laravel/framework/src/Illuminate/Translation/lang/'.replace('/', path.sep)

This way we'll be able to optionally skip framework translations, and having this php_en.json generated.

xiCO2k commented 1 week ago

Go ahead and make a PR for that, I will check.

Thanks for the suggestion.