I\'m using laravel (5.1) blade template engine with the localization feature.
There is a language file messages.php
within the /resources/lang/en/
Add a blade directive to the app/Providers/AppServiceProvider's boot() function:
public function boot() {
Blade::directive('lang_u', function ($s) {
return "";
});
}
This way you can use the following in your blade files:
@lang_u('messages.welcome')
which outputs: Welcome
You're @lang_u('messages.welcome') :)