Skip to content
Advertisement

How to insert a new value into lang file with Laravel 4

I knew that Laravel has Lang::get('xxx'); function

But when the string xxx was not an key in the lang array => it will just display xxx, then I have to manually type a new key => value into the lang file.

So is there anyway that if xxx not available in the lang file, it will automatically insert a new key and value to the lang file. like this:

return array(
   'xxx' => '',
);

Thank you so much for your time

Advertisement

Answer

Use this package Laravel Translation Manager

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement