symfony / demo

Symfony Demo Application
https://symfony.com/
MIT License
2.46k stars 1.61k forks source link

Error: Symfony\Polyfill\Intl\Icu\Locale::setDefault() Not Implemented #1505

Closed igor-jean closed 5 months ago

igor-jean commented 6 months ago

I encountered an error while trying to run the Symfony project. The error message states:

"The Symfony\Polyfill\Intl\Icu\Locale::setDefault() is not implemented. Please install the "intl" extension for full localization capabilities."

Installation Procedure Used:

I used option 2 for installation:

bash Copy code You can create a new project based on the Symfony Demo project... composer create-project symfony/symfony-demo my_project

...or you can clone the code repository and install its dependencies git clone https://github.com/symfony/demo.git my_project cd my_project/ composer install Server Launch Behavior:

When I launch the server using symfony serve, here's what happens: Capture d'écran 2024-03-04 165121

igor-jean commented 6 months ago

I just tried again, it doesn't work. I thinking it was the location.I am in France and when I launch the server the URL address appears like this: http://127.0.0.1:8000/fr So I tried to change the address to http://127.0.0.1:8000/en, and I managed to join the demo. Capture d'écran 2024-03-06 092356

derrabus commented 6 months ago

For the best experience, you should really install the INTL extension, as the error message suggests.


Regarding the issue, I'm unsure how we should tackle it. I basically see two options:

stof commented 6 months ago

Symfony should ignore this in the LocaleSwitcher, as already done in \Symfony\Component\HttpFoundation\Request::setLocale