This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use Stack Overflow.

IntlDateFormatter problem without 'intl' extension

Discuss installing Symfony 2 here

IntlDateFormatter problem without 'intl' extension

by benjhoo » Tue Nov 05, 2013 4:49 pm

I'm working on a Symfony2 project hosted on a server which does not contain the 'intl' php extension (not possible to activate the extension on this web host)

I read that Symfony2 internationalization functions can however work thanks to the Symfony Component 'intl'.

But I have an error trying to format a date :
Code: Select all
An exception has been thrown during the rendering of a template ("The Symfony\Component\Intl\DateFormatter\IntlDateFormatter::__construct() method's argument $locale value NULL behavior is not implemented. Only the locale "en" is supported. Please install the "intl" extension for full localization capabilities.") in MyBundle:xxxx:index.html.twig at line 10.

It seems $locale variable is defined to NULL.
Where can I define this variable ?
I have set this variable in my parameters.yml file to en_US but nothing change.

Any idea ?

Junior Member
Posts: 1
Joined: Tue Nov 05, 2013 4:35 pm