Support the ongoing development of Laravel.io →
Configuration Views Validation
Last updated 2 years ago.
0

I found a answer in other place, the solution:

  1. in \App\ i created DomainApplication.php
<?php namespace App;

class DomainApplication extends \Illuminate\Foundation\Application {
    public function langPath() {
        return '/path/to/new/lang/';
    }
}
  1. in /bootstrap/start.php i replaced $app new.. with
$app = new App\DomainApplication(
    realpath(__DIR__.'/../')
);

And now translations are loaded from new path and work without namespace:

dd(trans('passwords.password'));
0

Sign in to participate in this thread!

Eventy

Your banner here too?

oriceon oriceon Joined 28 Dec 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.