I have a multilingual project with English and Persian languages, While Persian is configured as locale for my project. localization files under lang directory in resources for both languages works fine except for parameters that I define.
under resources > lang in each language directory I created a general.php that returns associative array of my keywords and their replacements. It works fine but when if my key word contains a parameter it does not replace the parameter keywork.
Persian language general.php file
<?php
// general.php
return [
'sending for' => ':attribute ارسال برای',
'attributes' => [
'ahmad' => 'احمد'
],
];
?>
// index.blade.php
{{ __('sending for', ['attribute' => 'ahmad']) }};
// result of index page
ارسال برای ahmad
however I define keyword 'ahmad' in attributes array of general.php file but it still returns key not the value