Reputation: 13
I am new in Laravel
When I open a project from internet, some of the text shows the text with the addition word .
example : in sidebar menu, the text (menu) displayed is 'sidebar.job_vacancy'. The text should be display 'Job Vacancy' . ;
My blade file is
....
<li class="nav-item {{ menu_active('job.vacancy.*') }}">
<a href="{{route('job.vacancy.list', ['role' => user_role()])}}">
<i class="far fa-newspaper"></i>
<p>{{ ucwords(__('sidebar.job_vacancy')) }}</p>
</a>
</li>
....
And it refers to file in .....(my_project)\resources\lang\en\sidebar.php
return [
....
'job_vacancy' => 'job vacancy',
....
]
It has 2 support language, ID and EN After receiving some qlue, i have changed my ENV
APP_LOCALE=id
APP_LOCALES=en,id
APP_FALLBACK_LOCALE=id,en
APP_TIMEZONE='Asia/Jakarta'
MULTI_LANGUAGE=true
CDN_BASE_URL="http://localhost/iccn/public/"
But this is still not working
Upvotes: 1
Views: 226
Reputation: 17566
It seems that you are using a language that you do not support in your language. This means that Laravel will display the key from your translation help if Laravel cannot find a translation for the current language. Please have a look in your folder \resources\lang\{your-lang}\sidebar.php
if the file exists.if not, create it and then it will work with the ucfirst() function.
Upvotes: 1