mirror of
https://github.com/zoe-may/TDoG-Skin.git
synced 2025-01-19 10:27:24 +08:00
20 lines
477 B
PHP
20 lines
477 B
PHP
|
<?php
|
||
|
|
||
|
namespace App\Services\Translations;
|
||
|
|
||
|
use Spatie\TranslationLoader\TranslationLoaderManager;
|
||
|
|
||
|
class Loader extends TranslationLoaderManager
|
||
|
{
|
||
|
protected function loadPath($path, $locale, $group)
|
||
|
{
|
||
|
$translations = parent::loadPath($path, $locale, $group);
|
||
|
|
||
|
$full = "{$path}/{$locale}/{$group}.yml";
|
||
|
|
||
|
return count($translations) === 0 && $this->files->exists($full)
|
||
|
? resolve(Yaml::class)->parse($full)
|
||
|
: [];
|
||
|
}
|
||
|
}
|