diff --git a/src/TranslationsManager.php b/src/TranslationsManager.php index e8d83df..94fcc92 100644 --- a/src/TranslationsManager.php +++ b/src/TranslationsManager.php @@ -86,7 +86,7 @@ public function getTranslations(string $locale): array *

$file is with language like en/book/create.php while $excludedFile contains only wildcards or path like book/create.php

*

So, we need to remove the language part from $file before comparing with $excludeFile

*/ - if (fnmatch($excludeFile, str_replace($locale.'/', '', $file))) { + if (fnmatch($excludeFile, str_replace($locale.DIRECTORY_SEPARATOR, '', $file))) { return false; } }