I created a service provider where i load config from that paths, i load translator with namespace: $this->app['translator']->addNamespace('Agents', $domain_path . 'lang');
Now, the problem is that i want to remove /resources/lang/ entirely and move validation, pagination and passwords translations to my lang folders and need to find a way to load language by default from my custom place to escape using namespace in trans like trans('Agents::key ..') using directly trans('key').
With views i found a way to get views from custom place: $this->app['view']->addLocation($domain_path . 'lang/views/');
@oriceon If you use AI, it will tell you to do this, simpler:
class AppServiceProvider extends ServiceProvider
{
public function boot(): void
{
// Configure language path to use /lang directory instead of /resources/lang
$this->app->useLangPath(base_path('lang'));
}
}