Support the ongoing development of Laravel.io →
posted 10 years ago
Architecture
Last updated 2 years ago.
0

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...

Last updated 2 years ago.
0

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');
Last updated 9 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

vafrcor vafrcor Joined 1 Mar 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.