Laravel Translation Still `en` even if locale changed

843 Views Asked by At

i'm trying to change language with laravel but it still en (fallback_locale)

locale changes successfully to another language but laravel still depends on fallback_locale

while changing fallback locale to 'ar' as example, blade prints the key as web.product.name

i tried trans('web.product.name',[],'ar'); in tinker cmd and it works fine

/config/app.php

'locale' => 'ar',
'locales' => ['en', 'ar', 'ku', 'tu'],

php artisan cache:clear does not effect

echo 'locale' anywhere returns what i set but lang still en

1

There are 1 best solutions below

0
On

Have you tried clearing your cache?

php artisan config:clear