| Conditions | 2 |
| Paths | 2 |
| Total Lines | 18 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 24 | public function register() |
||
| 25 | { |
||
| 26 | parent::register(); |
||
| 27 | |||
| 28 | $paths = [ |
||
| 29 | // first add the default laravel lang directory path |
||
| 30 | $this->app['path.lang'] |
||
| 31 | ]; |
||
| 32 | |||
| 33 | // second append all the containers languages paths to the array |
||
| 34 | foreach (ShipButler::getContainersNames() as $containerName) { |
||
| 35 | $paths[] = app_path() . "/Containers/{$containerName}/Resources/Languages"; |
||
| 36 | } |
||
| 37 | |||
| 38 | $this->app->singleton('translation.loader', function ($app) use ($paths){ |
||
| 39 | return new FileLoader($app['files'], $paths); |
||
| 40 | }); |
||
| 41 | } |
||
| 42 | |||
| 44 |