Laravel translation not working

laravel, localization, translation

Solution

When you're putting language files into subfolder, you need to specify it using slash. So, try this instead:

{{ trans('admin/login.mail') }}

Problem

I have languages for french and english. Fallback and standard is french (fr). My folder structure: This is the content of the login.php (english): ``` <?php return [ 'welcome' => 'Welcome', 'mail' => 'E-Mail address', 'password' => 'Password' ]; ``` I am referencing the keys either using `@lang()` or `{{ trans('') }}`. Example: ``` <label for="email" class="col-md-4 control-label">{{ trans('admin.login.mail') }}</label> ``` However this gets returned as:

Original source