Question

I am working on windows machine with Wamp installed and PHP 5.4.3 Currently, I am developing a web application using Symfony2. While creating a form with the FormType, I needed to insert an inputfield that takes a float instead of a String. So, I used this code:

->add ( 'weight', 'number', array (
            'label' => 'register.weight',
            'widget_addon' => array (
                    'text' => 'kg',
                    'type' => 'append' 
            ) 
    ) )

when I click on the submit button, this exception appears:

The Symfony\Component\Intl\NumberFormatter\NumberFormatter::getSymbol() is not implemented. Please install the "intl" extension for full localization capabilities.

So I activated the php_intl extension by deleting the corresponded ";" in my php.ini

The previous exception disappears and everything goes well.

However, when I change the "locale" parameter in the parameters.yml file from "en" to "fr", the following exception appears:

Only the locale "en" is supported. 500 Internal Server Error - InvalidArgumentException

I am stuck with this exception for 2 days now. I could use some help.

Was it helpful?

Solution

Not only the PHP Extension intl is required but also the Symfony component: http://symfony.com/doc/current/components/intl.html

Add it to composer and other locales should be supported too.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top