i'm trying to call the data i need to the lang files then call it back in the blade file using the {{trans('')}}
tried to add the path into the lang file and call it back but it wont work
this is the lang file
'menu_1'=> '$category[\'languages\'][0][\'title\']',
'menu_2'=> '{{$category[\'languages\'][1][\'title\']}}'
and this is the blade file
{{trans('main.menu_1')}}
i need it to show the menu_1 name in the blade file but instead it's showing
$category[\'languages\'][0][\'title\']
Your Translation Text ist a String and is not interpreted as PHP. A way to get your code working would be to use {{array_get($category,trans('main.menu_1')}
} and store a the array path as dot notation in your language file like 'menu_1'=>'languages.0.title'