Use locales for numbers and currency.
This commit is contained in:
@@ -6,6 +6,7 @@ APP_TIMEZONE=UTC
|
|||||||
APP_URL=http://localhost
|
APP_URL=http://localhost
|
||||||
|
|
||||||
APP_LOCALE=en
|
APP_LOCALE=en
|
||||||
|
APP_CURRENCY=EUR
|
||||||
APP_FALLBACK_LOCALE=en
|
APP_FALLBACK_LOCALE=en
|
||||||
APP_FAKER_LOCALE=en_US
|
APP_FAKER_LOCALE=en_US
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
namespace App\Providers;
|
namespace App\Providers;
|
||||||
|
|
||||||
use App\View\Composers\TaxDropdown;
|
use App\View\Composers\TaxDropdown;
|
||||||
|
use Illuminate\Support\Number;
|
||||||
use Illuminate\Support\ServiceProvider;
|
use Illuminate\Support\ServiceProvider;
|
||||||
use Illuminate\Translation\Translator;
|
use Illuminate\Translation\Translator;
|
||||||
|
|
||||||
@@ -31,5 +32,7 @@ class AppServiceProvider extends ServiceProvider
|
|||||||
public function boot(): void
|
public function boot(): void
|
||||||
{
|
{
|
||||||
\Illuminate\Support\Facades\View::composer('components.tax-dropdown', TaxDropdown::class);
|
\Illuminate\Support\Facades\View::composer('components.tax-dropdown', TaxDropdown::class);
|
||||||
|
Number::useLocale(config('app.locale'));
|
||||||
|
Number::useCurrency(config('app.currency'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -80,6 +80,8 @@ return [
|
|||||||
|
|
||||||
'locale' => env('APP_LOCALE', 'de'),
|
'locale' => env('APP_LOCALE', 'de'),
|
||||||
|
|
||||||
|
'currency' => env('APP_CURRENCY', 'EUR'),
|
||||||
|
|
||||||
'fallback_locale' => env('APP_FALLBACK_LOCALE', 'en'),
|
'fallback_locale' => env('APP_FALLBACK_LOCALE', 'en'),
|
||||||
|
|
||||||
'faker_locale' => env('APP_FAKER_LOCALE', 'en_US'),
|
'faker_locale' => env('APP_FAKER_LOCALE', 'en_US'),
|
||||||
|
|||||||
Reference in New Issue
Block a user