amiranagram / localizator

Scan your Laravel project and generate language files ready to translate in language(s) of choosing.
Other
229 stars 29 forks source link

How to ignore folder #38

Closed william-koffi closed 2 years ago

william-koffi commented 2 years ago

I want to ignore all files in the resources/views/vendor folder.

amiranagram commented 2 years ago

hi @william-koffi, you can add a pattern to localizator.search.patterns that will be used to ignore files from the vendor folder.

mrleblanc101 commented 2 years ago

Would it be possible to add an ignore option for folder ? For exemple, we have a vendor/nova folder which is translated with PHP shortkey. But the Blade file are translated with JSON and fallback text.

mrleblanc101 commented 2 years ago

So in config instead of search.dirs, maybe search.include and search.exclude

amiranagram commented 2 years ago

I added the exclude options, which is basically an array of directories that will be excluded relative to the directories in search.dirs.

Example:

'dirs'      => ['resources/views'],
'exclude' => ['vendor'],

Here, vendor directory will be excluded from resources/views.