9

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

John Slegers
  • 45,213
  • 22
  • 199
  • 169
Alessandra
  • 467
  • 2
  • 6
  • 24

4 Answers4

2

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.

Thomas Leduc
  • 1,092
  • 1
  • 20
  • 44
2

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

You need re install package int1

apt-get install php-intl

service apache2 restart
Lamri Djamal
  • 236
  • 1
  • 10
0

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

ozahorulia
  • 9,798
  • 8
  • 48
  • 72
michal
  • 1