Hello,
I am currently using Laravel demo8 from Metronic 8 package.
I am getting an error when trying to change the "locale" setting in config/app.php from 'en' to 'ro' (a custom folder created by me with Romanian translations). I have even added the english translations provided by the theme in the 'ro' folder, but the error persists.
The output of the error:
Array to string conversion (View: xxxx\resources\views\layout\demo8\aside\_menu.blade.php)
The debug panel traces the error to app\Core\Menu.php:199, more specifically the
echo __($item['title']); from these lines:
if ( isset($this->callbacks['title']) && is_callable($this->callbacks['title']) ) {
echo call_user_func($this->callbacks['title'], $item, $item['title']);
} else {
echo __($item['title']);
...
}
To me, looks like the 'title' atribute from the menu is not recognized, but I may be wrong.
How can I solve this issue?
Thank you!
Hi,
Probably the file name under lang/ro/ has a similar name in the menu title.
For example;
resources/lang/ro/test.php
And in the menu, there is a "test" title.
Thanks
Hi Faizal,
I have tried your suggestion and unfortunately the error still persists.
If you have any other ideas please tell me.
Thanks
Hi David,
Could you please try to update the config after changing the config from app.php?
php artisan config:clear