Try this (you can put it in your app/start/global.php
if you want):
Lang::addNamespace('namespace', '/your/external/path');
Then you simply do this:
Lang::get('namespace::messages.welcome');
Don't know if there's a better way, let's see other replies...
This solution works for Laravel 5. Paste the code in a ServiceProvider in boot() function
function boot() {
$this->loadTranslationsFrom(__DIR__ . '/YOUR_PATH/', 'NAMESPACE');
}
Use like this
Lang::get('NAMESPACE::FILENAME.KEY');
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community