laravel-localization-helpers
laravel-localization-helpers copied to clipboard
Dynamic fields with parameters In language lines
Maybe this is more of a question, somewhat referencing issue #53 I am still getting the same error when running localization:missing command but on a different line
My directive is this:
@lang('pages/master/home.offers.message.' . session("message"), ['membership' => url('membership')])
And my translation file looks like this:
'offers' => array(
'message' => array(
'login' => 'You need to login first.',
'premium' => 'You need to change your membership to premium. If you want to know more, click <a class="btn-link" target="_blank" href=":membership">here</a> to find out.',
'card' => 'You can use your member card for this offer.'
)
),
Then I added message to the never_obsolete_keys array
'never_obsolete_keys' => array(
'dynamic',
'fields',
'message',
) ,
And the error_log gives this output:
'pages/master/home.offers.dynamic.message.' . session("message"), ['membership' => url('membership'
PHP ParseError: syntax error, unexpected ',', expecting ';' in /var/www/html/local.familiando/vendor/potsky/laravel-localization-helpers/src/Potsky/LaravelLocalizationHelpers/Factory/Localization.php(559) : eval()'d code on line 1