Search code examples
phplaravellaravel-4localization

Laravel - Multiple language files at custom locations


Is there a way to have multiple language files for the same language? I know that it would work if you have different packages, however i have a own plugin system. Is there a way to load additional language files on runtime?


Solution

  • If you do this (inside app/start/global.php or where you prefer)

    Lang::addNamespace('namespace', '/your/custom/location');
    

    then you should be able to

    Lang::get('namespace::filename.localekey');