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
0
votes
1 answer

Attempted to call function "idn_to_ascii" from the global namespace when trying to use Mail methods in Prestashop

I am receiving a 500 internal error in Prestashop whenever it comes to using the inbuilt PHP mail() method. After enabling debug mode, I found that the cause is this: (1/1) UndefinedFunctionException Attempted to call function "idn_to_ascii" from…
Jaquarh
  • 6,493
  • 7
  • 34
  • 86
0
votes
3 answers

How can I display different languages in a custom bottom bar and Drop List in Flutter?

I'm using ARB files along with code generation for my internalization solution for my flutter app. Everything seems to be work as expecting, but I do have one problem. I can't get the options in the drop down lists and my bottom bar to switch…
Andrew Stevenson
  • 578
  • 1
  • 9
  • 23
0
votes
1 answer

Is it possible to list all known localized currencies?

From the MDN Documentation, I can format a currency value with var locale = 'fr-CA'; var number = 123456.789; var currency = 'EUR'; console.log(new Intl.NumberFormat(locale, { style: 'currency', currency: currency }).format(number)); // expected…
Yanick Rochon
  • 51,409
  • 25
  • 133
  • 214
0
votes
2 answers

Reduce a UTF-8 string for binary comparison

I want to quickly check if an UTF-8 word exists as an array key. The words may have: different case accented characters or not different Unicode normalization forms I can use mb_strtolower() to make them both lowercase, and Normalizer::normalize()…
BenMorel
  • 34,448
  • 50
  • 182
  • 322
0
votes
1 answer

localizedcurrency filter raise 'non well formed numeric value' after division

I'm using Twig for render a template that contains something like this: {{ any_int_number / 100.0|localizedcurrency('EUR') }} That localizedcurrency filter comes from Twig_Extensions_Extension_Intl and allows to convert a number in the right…
snoob dogg
  • 2,491
  • 3
  • 31
  • 54
0
votes
4 answers

Mac 10.6 - unable to install PHP intl

I'm trying to install the PHP intl extension on Mac 10.6 "Snow Leopard" using the following command: sudo pecl install intl ...but getting the following errors: running: phpize grep: /usr/include/php/main/php.h: No such file or directory grep:…
josef.van.niekerk
  • 11,941
  • 20
  • 97
  • 157
0
votes
0 answers

Every devices using IOS13 doesn't display numbers correctly if   is used at its end or if the library Intl is used

As the title says, IOS13 doesn't display numbers correctly. Numbers such as 100 000 will be written as 100000, which according to french syntax rules on numbers is not correct. (Kinda like english says that numbers should be written like 100'000 and…
J. Lev
  • 307
  • 3
  • 19
0
votes
1 answer

PHP IntlDateFormatter returning different values on different servers

What is the reason for IntlDateFormatter returning different values for a UTC time across these different servers (see last output line from examples below)? Server A > php --version PHP 7.3.6 (cli) (built: Jun 17 2019 21:27:20) ( NTS ) Copyright…
etipaced
  • 125
  • 1
  • 11
0
votes
1 answer

Get timezone names using en-US locale

While using the Intl.DateTimeFormat, I noticed that the timezone short names are not set when using a locale which does not have the specified timezone, for example en-US locale does not contain the Australia/Sydney timezone information. Is there a…
nikravi
  • 870
  • 9
  • 11
0
votes
1 answer

How to install intl and mcrpyt in Mac OS for PHP 7.2?

How we can install intl and mcrpyt in Mac OS for PHP 7.2? Please suggest. Thanks!
0
votes
1 answer

PHP module shows in php cli, not in Apache (XAMPP, Mac OS Mojave)

I have managed to enable the intl module on my machine (it was quite tricky), and when I do php -m | grep intl I see the module listed. My problem is that it seems the module is enabled, but still XAMPP is probably loading some other version of PHP…
Luis Serrano
  • 1,174
  • 1
  • 8
  • 17
0
votes
1 answer

Why is PHP's NumberFormatter nickel-rounding formatted Swiss Franc amounts?

Using the formatCurrency() method on the NumberFormatter class with the CHF (Swiss Francs) currency is rounding amounts to the nearest nickel amount (0.05) for me. Code: $formatter = new \NumberFormatter('en_US', \NumberFormatter::CURRENCY); echo…
1000Nettles
  • 2,314
  • 3
  • 22
  • 31
0
votes
1 answer

Intl NuberFormat bad thai currency

I'm trying to get some currencyFormatter for the application but I encountered some problem. I am able to use most of the currency formats with corresponding symbols correctly i.e. var usd = new Intl.NumberFormat('en-GB', { style: 'currency',…
Mugetsu
  • 1,739
  • 2
  • 20
  • 41
0
votes
0 answers

Install intl.so Extension on MAMP mac system

so I cant install the intl.so extension, which I need for my phpUnit test. My system macOS Mojave PHP 7.1.19 installed at /usr/bin/php php -m | grep intl returns nothing. So i tried to Install intl with sudo /Users/beatgurtner/pear/bin/pecl…
B. Rentrug
  • 103
  • 1
  • 11
0
votes
2 answers

Trying to install locally "Prestashop" but INTL isn't installed correctly

I'm trying to install Prestashop locally on my WAMP server without any success, when I execute the command php composer.phar install the terminal gives me this error: Loading composer repositories with package information Installing dependencies…