Laravel Blade Localization in if statement
By : user5289358
Date : March 29 2020, 07:55 AM
will help you Ah, me dumdum... I didn't realise that @if also needs an @endif if there is an @else after the @if.... Sorry to bother all the readers.
|
Blade Templates reusable
By : ARDN
Date : March 29 2020, 07:55 AM
this will help I came to laravel and I am having trouble with blade. , You using blade syntax in PHP style array. Change Your code like so: code :
@include('blocks.js.modal', [
'title' => TextHelper::textLang('Guardar llamada','common'),
'close' => TextHelper::textLang('Cerrar','common'),
'save' => TextHelper::textLang('Guardar','common')
])
|
Laravel 5.5 Blade Directive and Localization Not Working Together
By : Saados Man
Date : March 29 2020, 07:55 AM
I wish did fix the issue. Why you aren't using __('messages.welcome') (underscore-underscore-function)? Maybe this should work: code :
Blade::directive('up', function ($expression) {
return echo strtoupper(__($expression));
});
{{ @up(__('translation.string')) }}
Blade::directive('up', function ($expression) {
return echo strtoupper($expression);
});
{{ strtoupper(__('translation.string')) }}
|
Pluralization in laravel blade @lang() localization?
By : ozgun bursali
Date : March 29 2020, 07:55 AM
hop of those help? Laravel 5 provides translations using the @lang helper , There is a @choice blade directive for this. code :
Course duration: {{ $course->days }} @choice('day|days', $course->days)
|
Laravel Localization dropdown in blade
By : user2631009
Date : March 29 2020, 07:55 AM
I wish this helpful for you I am trying to implement laravel localization. , Can you try this: code :
@if ( Config::get('app.locale') == 'it')
@elseif ( Config::get('app.locale') == 'en' )
@elseif ( Config::get('app.locale') == 'de' )
@endif
|