Skip to content

Commit caf0fce

Browse files
committed
Fixes #3254 add ability to override existing translation validation language in App
This reverts commit eeaa922.
1 parent a18fdea commit caf0fce

2 files changed

Lines changed: 14 additions & 1 deletion

File tree

app/Language/en/Validation.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?php
2+
3+
// override core en language system validation or define your own en language validation message
4+
return [];

system/Language/Language.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,16 @@ protected function load(string $file, string $locale, bool $return = false)
338338
*/
339339
protected function requireFile(string $path): array
340340
{
341-
$files = Services::locator()->search($path);
341+
$files = Services::locator()->search($path);
342+
$files = array_merge(
343+
array_filter($files, function ($value) {
344+
return strpos($value, APPPATH) === false;
345+
}),
346+
array_filter($files, function ($value) {
347+
return strpos($value, APPPATH) === 0;
348+
})
349+
);
350+
342351
$strings = [];
343352

344353
foreach ($files as $file)

0 commit comments

Comments
 (0)