Translate everything on settings page
ADD
resources/lang/dk/pages.php
+<?php
+
+return [
+ 'settings' => 'Indstillinger'
+];

ADD
resources/lang/dk/user.php
+<?php
+
+return [
+ 'avatar' => 'Avatar',
+ 'name' => 'Navn',
+ 'email' => 'E-mail',
+ 'password' => 'Adgangskode',
+ 'language' => 'Sprog',
+ 'theme' => 'Tema',
+ 'currency' => 'Valuta',
+ 'weekly_report' => 'Ugentlig Rapport'
+];

MODIFY
resources/lang/en/actions.php
resources/lang/en/actions.php
@@ -4,5 +4,10 @@ return [
'create' => 'Create',
'edit' => 'Edit',
'save' => 'Save',
- 'delete' => 'Delete'
+ 'delete' => 'Delete',
+
+ 'verify' => 'Verify',
+
+ 'yes' => 'Yes',
+ 'no' => 'No'
];

MODIFY
resources/lang/en/general.php
resources/lang/en/general.php
<?php
return [
- 'currency' => 'Currency',
-
'dashboard' => 'Dashboard',
'total_earned' => 'Total Earned',
@@ -23,14 +21,10 @@ return [
'recent' => 'Recent',
- 'avatar' => 'Avatar',
- 'name' => 'Name',
- 'email' => 'E-mail',
- 'verify' => 'Verify',
- 'password' => 'Password',
- 'language' => 'Language',
- 'theme' => 'Theme',
-
'recurrings' => 'Recurrings',
- 'recurring' => 'Recurring'
+ 'recurring' => 'Recurring',
+
+ 'profile' => 'Profile',
+ 'account' => 'Account',
+ 'preferences' => 'Preferences'
];

ADD
resources/lang/en/pages.php
+<?php
+
+return [
+ 'settings' => 'Settings'
+];

ADD
resources/lang/en/user.php
+<?php
+
+return [
+ 'avatar' => 'Avatar',
+ 'name' => 'Name',
+ 'email' => 'E-mail',
+ 'password' => 'Password',
+ 'language' => 'Language',
+ 'theme' => 'Theme',
+ 'currency' => 'Currency',
+ 'weekly_report' => 'Weekly Report'
+];

MODIFY
resources/lang/nl/actions.php
resources/lang/nl/actions.php
@@ -4,5 +4,10 @@ return [
'create' => 'Cre&euml;er',
'edit' => 'Bewerk',
'save' => 'Opslaan',
- 'delete' => 'Verwijderen'
+ 'delete' => 'Verwijderen',
+
+ 'verify' => 'Controleer',
+
+ 'yes' => 'Ja',
+ 'no' => 'Nee'
];

MODIFY
resources/lang/nl/general.php
resources/lang/nl/general.php
<?php
return [
- 'currency' => 'Valuta',
-
'dashboard' => 'Overzicht',
'total_earned' => 'Totaal Verdiend',
@@ -23,14 +21,10 @@ return [
'recent' => 'Recente',
- 'avatar' => 'Avatar',
- 'name' => 'Naam',
- 'email' => 'E-mail',
- 'verify' => 'Controleer',
- 'password' => 'Wachtwoord',
- 'language' => 'Taal',
- 'theme' => 'Thema',
-
'recurrings' => 'Terugkerenden',
- 'recurring' => 'Terugkerend'
+ 'recurring' => 'Terugkerend',
+
+ 'profile' => 'Profiel',
+ 'account' => 'Account',
+ 'preferences' => 'Voorkeuren'
];

ADD
resources/lang/nl/pages.php
+<?php
+
+return [
+ 'settings' => 'Instellingen'
+];

ADD
resources/lang/nl/user.php
+<?php
+
+return [
+ 'avatar' => 'Avatar',
+ 'name' => 'Naam',
+ 'email' => 'E-mail',
+ 'password' => 'Wachtwoord',
+ 'language' => 'Taal',
+ 'theme' => 'Thema',
+ 'currency' => 'Valuta',
+ 'weekly_report' => 'Wekelijks Verslag'
+];

MODIFY
resources/views/settings.blade.php
resources/views/settings.blade.php
@extends('layout')
-@section('title', 'Settings')
+@section('title', __('pages.settings'))
@section('body')
<div class="wrapper my-3">
- <h2>Settings</h2>
+ <h2>{{ __('pages.settings') }}</h2>
<div class="box mt-3">
<form method="POST" enctype="multipart/form-data">
{{ csrf_field() }}
<div class="box__section row">
- <div class="row__column">Profile</div>
+ <div class="row__column">{{ __('general.profile') }}</div>
<div class="row__column" style="flex: 2;">
<div class="input input--small">
- <label>{{ __('general.avatar') }}</label>
+ <label>{{ __('user.avatar') }}</label>
@if (Auth::user()->avatar)
<img src="/storage/avatars/{{ Auth::user()->avatar }}" style="width: 200px; height: 200px; border-radius: 5px; object-fit: cover;" />
@else
@include('partials.validation_error', ['payload' => 'avatar'])
</div>
<div class="input input--small">
- <label>{{ __('general.name') }}</label>
+ <label>@lang('user.name')</label>
<input type="text" name="name" value="{{ Auth::user()->name }}" />
</div>
</div>
</div>
<div class="box__section row">
- <div class="row__column">Account</div>
+ <div class="row__column">{{ __('general.account') }}</div>
<div class="row__column" style="flex: 2;">
<div class="input input--small">
- <label>{{ __('general.email') }}</label>
+ <label>{{ __('user.email') }}</label>
<input type="text" name="email" value="{{ Auth::user()->email }}" />
</div>
<div class="row">
<div class="row__column input">
- <label>{{ __('general.password') }}</label>
+ <label>{{ __('user.password') }}</label>
<input type="password" name="password" />
@include('partials.validation_error', ['payload' => 'password'])
</div>
<div class="row__column input ml-2">
- <label>{{ __('general.verify') }} {{ __('general.password') }}</label>
+ <label>{{ __('actions.verify') }} {{ __('user.password') }}</label>
<input type="password" name="password_confirmation" />
@include('partials.validation_error', ['payload' => 'password_confirmation'])
</div>
</div>
</div>
<div class="box__section row">
- <div class="row__column">Preferences</div>
+ <div class="row__column">{{ __('general.preferences') }}</div>
<div class="row__column" style="flex: 2;">
<div class="input input--small">
- <label>{{ __('general.language') }}</label>
+ <label>{{ __('user.language') }}</label>
<select name="language">
@foreach ($languages as $key => $value)
<option value="{{ $key }}" @if (Auth::user()->language === $key) selected @endif>{{ $value }}</option>
@include('partials.validation_error', ['payload' => 'language'])
</div>
<div class="input input--small">
- <label>{{ __('general.theme') }}</label>
+ <label>{{ __('user.theme') }}</label>
<select name="theme">
<option value="light" {{ Auth::user()->theme == 'light' ? 'selected' : '' }}>Light</option>
<option value="dark" {{ Auth::user()->theme == 'dark' ? 'selected' : '' }}>Dark (Experimental)</option>
@include('partials.validation_error', ['payload' => 'theme'])
</div>
<div class="input input--small">
- <label>{{ __('general.currency') }}</label>
+ <label>{{ __('user.currency') }}</label>
<select name="currency">
@foreach ($currencies as $currency)
<option value="{{ $currency->id }}" {{ Auth::user()->currency_id == $currency->id ? 'selected' : '' }}>{!! $currency->symbol !!} &middot; {{ $currency->name }}</option>
@include('partials.validation_error', ['payload' => 'currency'])
</div>
<div class="input input--small mb-0">
- <label>Weekly Report</label>
+ <label>{{ __('user.weekly_report') }}</label>
<div>
- <input type="radio" name="weekly_report" value="true" {{ Auth::user()->weekly_report ? 'checked' : '' }} /> Yes
+ <input type="radio" name="weekly_report" value="true" {{ Auth::user()->weekly_report ? 'checked' : '' }} /> {{ __('actions.yes') }}
</div>
<div>
- <input type="radio" name="weekly_report" value="false" {{ Auth::user()->weekly_report ? '' : 'checked' }} /> No
+ <input type="radio" name="weekly_report" value="false" {{ Auth::user()->weekly_report ? '' : 'checked' }} /> {{ __('actions.no') }}
</div>
@include('partials.validation_error', ['payload' => 'weekly_report'])
</div>
</div>
</div>
<div class="box__section box__section--highlight text-right">
- <button class="button">Update</button>
+ <button class="button">{{ __('actions.save') }}</button>
</div>
</form>
</div>

Translate everything on settings page