Skip to content

Tag: localization

laravel feature tests with locales

I am new to Laravel and I am having an issue to write a test function that asserts that the HTTP response of my welcome page is 200 knowing that I have EN and FR locales defined, meaning that the test should test both localhost:8000/en and localhost:8000/fr. This is my exampletest.php: I don’t like writing the code twice for both

Laravel class translator does not exist in a configuration file

Is there any way that allows inserting translatable value in configuration file in laravel-5.4 application? I have a custom configuration file at config/fox-reports.php and I’m trying to set a translatable configuration value looks like the following: When I run php artisan config:cache the following error is generated: In Container.php line 729: Answer You can’t use the __() helper in config

Best practice multi language website

I’ve been struggling with this question for quite some months now, but I haven’t been in a situation that I needed to explore all possible options before. Right now, I feel like it’s time to get to know the possibilities and create my own personal preference to use in my upcoming projects. Let me first sketch the situation I’m looking

Date and time in Greek

I’m currently using a website to get the time in Athens: $d = new DateTime(“now”, new DateTimeZone(“Europe/Athens”)); echo $d->format(“l, d M Y”); But I would like the date to be displayed in …