9
votes

During orocrm installation (a platform developed with symfony 2) I receive this error

Fatal error: Uncaught exception 'Symfony\Component\Intl\Exception\MethodArgumentValueNotImplementedException' with message 'The   Symfony\Component\Intl\Collator\Collator::__construct() method's argument $locale value 'fr_FR' behavior   is not implemented. Only the locale "en" is supported.  Please install the "intl" extension for full    localization capabilities.' in /Users/ale/Sites/educacloud-  bo/vendor/symfony/symfony/src/Symfony/Component/Intl/Collator/Collator.php:80
Stack trace:
#0 /Users/ale/Sites/educacloud-bo/app/SymfonyRequirements.php(619):   Symfony\Component\Intl\Collator\Collator->__construct('fr_FR')
#1 /Users/ale/Sites/educacloud-bo/app/OroRequirements.php(24): SymfonyRequirements->__construct()
#2 /Users/ale/Sites/educacloud-bo/app/oro-check.php(6): OroRequirements->__construct()
#3 {main}
thrown in /Users/ale/Sites/educacloud-bo/vendor/symfony/symfony/src/Symfony/Component/Intl/Collator/Collator.php on line 80

but I have installed intl extension:

# php -i | grep intl
 /usr/local/php5/php.d/50-extension-intl.ini,
 intl 
 intl.default_locale => it_IT => it_IT
 intl.error_level => 0 => 0

and php_info() on my browser give me these results:

version 1.1.0
ICU version 4.6
ICU Data version    4.6

What is the problem? thanks Alessandra

4
What version of symfony/icu is installed?Michael Sivolobov
Symfony version 2.3.19. I don't want to change locale, I want to un-traslate some bundles.Alessandra
I asked not symfony version but icu-version. You can find it in composer.lock file.Michael Sivolobov
I have the same issue. This happens to me in production (ubuntu 14) and not in dev (debian). In production php5-intl triggers the dependency installation of libicu52, maybe some backward compatibility issues herePierre de LESPINAY

4 Answers

2
votes

By default, symfony2 is able to manage the "en" extension but to get other language, you have to install the php-intl extension.

The easiest option is to install it with the composer, because it expose global variable for you ... etc

All of this is explained here symfony/components/intl.

For the composer extension installation it's symfony/components/using_components.

So after eading this, you need to execute :

composer require symfony/intl

-- EDIT

Ok, I'm sorry, I've just test the solution, and the fact is : if you use the symfony component you have only access to "en". I have the same problem as you, my php5-intl extension was installed and activated but the error persisted. For me it was that I continue to write use Symfony\Component\Intl\DateFormatter\IntlDateFormatter; at the top of my file instead of using the basic php5 extension.

2
votes

Do one thing that might be helpful for resolve this error open php.ini file remove comment from ;extension=php_intl.dll

extension=php_intl.dll

and restart the Apache server

1
votes

You need re install package int1

apt-get install php-intl

service apache2 restart
0
votes

Check solutions:

In Symfony 2.0:

app/config/config.yml

framework: session: { default_locale: it_IT }

In Symfony 2.1+:

app/config/config.yml

framework: default_locale: it_IT