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

PHP NumberFormatter always gives me the default en_US

When trying to format currency in my PHP 8.1 alpine docker container I always get the default locale (en_US). $ docker run -it --rm php:8.1-fpm-alpine /bin/ash # apk update && apk add icu-dev # docker-php-ext-configure intl && docker-php-ext-install…
Frank
  • 53
  • 4
5
votes
1 answer

Intl polyfills for React Native 0.63 and hermes

I ran into issues when I turned on hermes in my app. Specifically with Intl support, I'm getting this error in Android ReferenceError: Property 'Intl' doesn't exist, js engine: hermes. I've read these posts already Reddit comment Github…
Saul Clavijo
  • 201
  • 2
  • 10
5
votes
0 answers

OSX Big Sur unable to install php 7.4 intl

I am getting crazy since days as my new MacBook OS X Big Sur with php@7.4 is giving issues to XAMPP. As far as I understood it's better to use the php from OS X than from XAMPP, but I am getting error while trying to install intl using brew. Here my…
Echecivuole
  • 93
  • 1
  • 11
5
votes
1 answer

When installing php7.3-intl on debian docker gives error "has no installation candidate"

I have a wordpress installation via docker-compose. It uses php7.3 (I checked for version). Now the problem is like this : A wp function uses Locale class -> need to enable php_intl(not found in php.ini) -> tried to install php7.3-intl -> Gives…
5
votes
1 answer

wrong converting from gregorian to persian calendar in some days

I want to use PHP's IntlDateFormater to use persian calendar in my code. This days PHP has built-in functions witch supoorts persian calendar and works fine but I have a problem with certain days. for example using this code all dates converts from…
mehdi jalilvand
  • 450
  • 4
  • 12
5
votes
0 answers

How to install intl 55.1 version matched with symfony3?

I have installed symfony 3.1. An error info occur when to check whether is ready to run Symfony applications. My intl icu was installed with command apt-get install php5-intl,the version is 52.1 lower than 55.1. Here is my steps to compile intl…
showkey
  • 482
  • 42
  • 140
  • 295
5
votes
4 answers

Install PHP 7.0 Internationalization extension (Intl) on XAMPP on Mac

I followed the instructions outlined here: Install PHP Internationalization extension (Intl) on XAMPP on Mac Ran sudo pecl install intl selected the correct files from the Cellar then this error…
Danny F
  • 392
  • 8
  • 21
5
votes
3 answers

Trouble installing PHP 5.3.0 with intl-support

Currently I'm trying to install PHP 5.3.0 on some Linux testing server. As we've urgently waited for ext/intl we want to check out the features it provides. I'm running configure successfully with the following arguments ./configure …
Stefan Gehrig
  • 82,642
  • 24
  • 155
  • 189
4
votes
3 answers

Class Normalizer not found (in PHP 5.3.8)

I'm receiving this PHP error while trying to use the Normalizer class, specifically the Normalizer::normalize function: Fatal error: Class 'Normalizer' not found. I'm currently using PHP 5.3.8 so, according to the PHP documentation, it should be…
federico-t
  • 12,014
  • 19
  • 67
  • 111
4
votes
1 answer

How to get the default currency from the PHP Intl ( ICU library )

I use PHP, and like to know how I can get the default currency for a locale via the Internationalization extension (Wrapper for the ICU library)? Below is a script that explains, what and why. I need something to replace the getCurrCode() function…
RoboTamer
  • 3,474
  • 2
  • 39
  • 43
4
votes
1 answer

Producing lists in Intl/ICU with PHP

I'm using PHP 5.3's Intl extension for formatting strings on my website. However, I have happened upon a string that requires a list of items. The list given to the website can be any number of items, and should appear in however the language…
Kevin Fee
  • 495
  • 4
  • 17
4
votes
2 answers

TS2339: Property 'DisplayNames' does not exist on type 'typeof Intl'

How can i fix that type error? TS2339: Property 'DisplayNames' does not exist on type 'typeof Intl'. my function: export const getLanguageName = (locale: string | null) => { const localeName = new Intl.DisplayNames([locale], { type: 'language'…
Cor4zon
  • 63
  • 6
4
votes
2 answers

Get current decimal delimiter in event subscriber / parse localized string to float

How can I get the current number format (decimal separator, thousands seperator) according to the store-front's locale in a subscriber of the ProductListingCriteriaEvent event in Shopware 6 ? Goal is to parse strings to float which are given in the…
Alex
  • 32,506
  • 16
  • 106
  • 171
4
votes
2 answers

Flutter easy_localization and intl version solving failed

I'm getting this error after updating flutter to version 1.25.0-8.1.pre- Because `easy_localization` >=2.1.0+1 depends on `flutter_localizations` any from sdk which depends on `intl` 0.17.0-nullsafety.2, `easy_localization` >=2.1.0+1 requires `intl`…
4
votes
2 answers

ResourceBundle returns NULL without any errors being raised

For internationalized data it would be great to work with the \ResourceBundle class from PHP's "intl" extension. I got the extension running (PHP 5.3.4; Windows) and created a .dat file using the ICU Data Library Customizer*, but I don't get the…
Roland Franssen
  • 1,038
  • 1
  • 11
  • 22