Questions tagged [intl]

Intl is a PHP extension which give ability to use Unicode, software internationalization (I18N) and globalization (G11N) from the ICU library.

Intl is the short description for Internationalization.

It's a PHP extension which create a wrapper for the library.

There are several modules available:

More information can be found on the PHP.net documentation.

434 questions
3
votes
2 answers

1 error generated. make: *** [php_intl.lo] Error 1 ERROR: `make' failed

I have php 7.3.4 installed on my macbook pro and I am trying to enable a php extension which composer requires (intl). I have enabled the extension intl in php.ini, to which I received an error message saying it can not be found - so I'm assuming…
James Gedny
  • 112
  • 1
  • 8
3
votes
1 answer

Why is my IntlDateFormatter formatting the wrong day?

I am trying to format a date from the past but apparently fail to do so. The issue is, that the date is not just off by a few hours (which could be due to different timezones), but instead it is off by 5 days. This is my example code:
apfelbox
  • 2,625
  • 2
  • 24
  • 26
3
votes
3 answers

What does this line of code mean? const {"intl": { formatMessage }, } = this.context

I'm new in react and I'm reading some code i found this line of code: const {intl: { formatMessage }, } = this.context is a const declaration but i don't understand I know is JS ES6 but i don't understand what is it for? How can I check the value…
Angelotti
  • 673
  • 1
  • 6
  • 20
3
votes
1 answer

Error installing intl extension on MacOSx php7

I'm using XAMPP with MacOsX High Sierra and I need to install "intl" extension for php 7.1. I followed the steps described here Php-intl installation on XAMPP and others threads but they didn't work with me. I tried to install intl with pecl but I…
Juan Fernandez Sosa
  • 570
  • 1
  • 5
  • 19
3
votes
0 answers

"Please install the "intl" extension for full localization capabilities" when intl IS installed

Symfony 2.8 project in ubuntu 16.04 I got this exception: An exception has been thrown during the rendering of a template ("The Symfony\Component\Intl\DateFormatter\IntlDateFormatter::__construct() method's argument $locale value 'es' behavior…
Sephy
  • 159
  • 1
  • 2
  • 15
3
votes
3 answers

AWS Lambda Node.js Full-ICU

I run node.js app localy with this command: $ node --icu-data-dir=node_modules/full-icu app.local.js How to specify icu-data-dir in AWS Lambda environment? Thanks
Luke1988
  • 1,850
  • 2
  • 24
  • 42
3
votes
1 answer

Posix and intl extension on windows

When I installed Symfony2 sandbox and try to check requirements by check.php I had 2 problems. My server don't have posix and intl extensions. I'm using WampServer 2.1e (32 bits) on Windows 7 32bit so my versions of apache and php are: Apache 2.2.17…
kierzniak
  • 41
  • 1
  • 3
3
votes
0 answers

react-intl composite message

I'm struggling to work out the best way to structure messages whereby one of the dynamic values also needs a translation. For example if I have the message 'Type in Spanish...' I would like to use this message in every different combination for all…
djskinner
  • 8,035
  • 4
  • 49
  • 72
3
votes
1 answer

Creating DateTime from pattern provided by intl extension PHP

I have a project where date could be entered in different formats by locale for example: english format: 17/04/2017 korean format 17. 4. 24. I get this data as a string in php. I need this string to be converted to DateTime object somehow. when I…
Einius
  • 1,352
  • 2
  • 20
  • 45
3
votes
1 answer

PHP PECL extension intl giving garbled results for Swedish ordinal numbers

I'm using the PECL intl module to localize dates and numbers in a PHP project. In all other languages I'm using (40), localizing ordinal numbers works fine. In Swedish, however, I get strange output. It appears to be the template constants used to…
Lucent
  • 1,614
  • 1
  • 19
  • 22
3
votes
0 answers

It is possible to determine a text orientation by locale with intl extension?

Can't find in the documentation. May be exists undocumented method or some hacks. Something like this: Locale::getTextOrientation('en'); //returns Left-to-right Or someone knows another extension/library to do this.
cetver
  • 11,279
  • 5
  • 36
  • 56
3
votes
3 answers

How to fix JavaScript function that prevents dropdown list from working

My complete JavaScript code is https://jsfiddle.net/JSstarter/0t98gbg3/. Dropdown list worked, but after I add setFormat function, the dropdown list stops working and it doesn't show the list of locales. Can someone please help me how to fix the…
3
votes
1 answer

How to brew install node.js with Intl?

I was expecting that Intl object was included by default in node v0.12, but when I install node via brew it is not: $ node -v v0.12.2 $ node > console.log(Intl) ReferenceError: Intl is not defined How can i get the Intl object when installing…
gpbl
  • 4,721
  • 5
  • 31
  • 45
3
votes
1 answer

pecl install intl gives no releases available?

I'm using mac and xampp and trying to install php package intl for using phpdocumentor as required. I follow this instruction to install: Installing Intl package on your mac with xampp But when I was trying to install intl with pecl, it gave me…
Hà Link
  • 367
  • 1
  • 6
  • 20
3
votes
1 answer

OSX 10.10 PHP Composer not finding required extensions intl and mcrypt

I am attempting to create a cake PHP application on OSX 10.10 using the following command: php /usr/local/bin/composer.phar create-project --prefer-dist cakephp/app testapp When I do I am getting the following error: Your requirements could not be…
user1901469
  • 1,169
  • 1
  • 10
  • 21