diff --git a/.env.example b/.env.example index a1b3de4..986c58b 100644 --- a/.env.example +++ b/.env.example @@ -6,6 +6,7 @@ APP_TIMEZONE=UTC APP_URL=http://localhost APP_LOCALE=en +APP_CURRENCY=EUR APP_FALLBACK_LOCALE=en APP_FAKER_LOCALE=en_US diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index a6a2a9e..ea001c5 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -3,6 +3,7 @@ namespace App\Providers; use App\View\Composers\TaxDropdown; +use Illuminate\Support\Number; use Illuminate\Support\ServiceProvider; use Illuminate\Translation\Translator; @@ -31,5 +32,7 @@ class AppServiceProvider extends ServiceProvider public function boot(): void { \Illuminate\Support\Facades\View::composer('components.tax-dropdown', TaxDropdown::class); + Number::useLocale(config('app.locale')); + Number::useCurrency(config('app.currency')); } } diff --git a/config/app.php b/config/app.php index f20965b..d389d67 100644 --- a/config/app.php +++ b/config/app.php @@ -80,6 +80,8 @@ return [ 'locale' => env('APP_LOCALE', 'de'), + 'currency' => env('APP_CURRENCY', 'EUR'), + 'fallback_locale' => env('APP_FALLBACK_LOCALE', 'en'), 'faker_locale' => env('APP_FAKER_LOCALE', 'en_US'),