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

React Intl Formatting date

i have incoming date in exactly like this string: myDate= ' 2017-05-05T12:24:06+0000' i am using FormattedDate from 'react-intl' to achieve my desired format 12:24, 5 May 2017 But with this code:
palyxk
  • 341
  • 2
  • 4
  • 17
9
votes
1 answer

Get CLDR information from Intl extension in php

I used Zend_Locale before but it's seems PHP intl extension have cldr information. I need to get some info like get available countries for each language? for example en has US, UK, GB and fa has IR and AF and more data available on CLDR…
9
votes
4 answers

A php platform install ask me intl extension, but it seems already installed

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 …
Alessandra
  • 467
  • 2
  • 6
  • 24
9
votes
7 answers

Why can't PHP on Windows see extension php_intl.dll even though it exists?

I've been trying to get the intl extension working on my test workstation (PHP 5.5.1, Apache 2.2.4, Windows 7 32-bit). It seems that no matter what I try I can't get it up and running. I've uncommented the line "extension=php_intl.dll" in my…
PerceptorII
  • 119
  • 1
  • 1
  • 5
9
votes
1 answer

IntlDateFormatter::format(): datefmt_format: takes either an array or an integer timestamp value or a DateTime object (SonataSanBox)

I have installed SonataAdmin Bundle. All is working fine but, when I add any user from dashboard, it throws a warning: Warning: IntlDateFormatter::format(): datefmt_format: takes either an array or an integer timestamp value or a DateTime object in…
Krishna Ghodke
  • 589
  • 2
  • 6
  • 26
9
votes
3 answers

How do I get NumberFormatter to print negative currency values with a minus sign?

I'm using the PHP NumberFormatter class to print currency values. Eg: $cFormatter = new NumberFormatter('en_US', NumberFormatter::CURRENCY); $cFormatter->formatCurrency(123, 'USD'); $cFormatter->formatCurrency(123, 'BRL'); …
John Carter
  • 53,924
  • 26
  • 111
  • 144
8
votes
1 answer

How to have Luxon's Intl API working in React-Native

I've been using Luxon for quite sometime as a replacement for moment, being light weight and an overall great documentation, I've now bumped into a case where I needed to use luxon's toFormat function to write the date month name. Now this problem…
Luís Mestre
  • 1,851
  • 1
  • 11
  • 29
7
votes
1 answer

PHP7.2 missing intl extension

I'm trying to run php app that use locale_accept_from_http function from intl extension. My php version is 7.2 and I get an error: Call to undefined function locale_accept_from_http(); I was trying: 1. Install extension sudo apt-get install…
Andriy Lozynskiy
  • 2,444
  • 2
  • 17
  • 35
7
votes
4 answers

How do I enable the intl extension in CakePHP?

I am using CakePHP 3 and MAMP Pro server for my project. When I am trying to bake the cake, this error shows up: Fatal error: You must enable the intl extension to use CakePHP. I have even included intl.so and extension=php_intl.dll in my php.ini…
Srinidhi Karnati
  • 71
  • 1
  • 1
  • 3
7
votes
4 answers

Why Normalizer::normalize (PHP) doesn't work?

I'm trying to normalize strings with characters like 'áéíóú' to 'aeiou' to simplify searches. Following the response to this question I should use the Normalizer class to do it. The problem is that the normalize function does nothing. For example,…
francadaval
  • 2,451
  • 3
  • 26
  • 36
6
votes
3 answers

ReferenceError: Can't find variable: Intl (Android Expo)

I'm developing React Native app with Expo. I'm having problems with my app in Android because always send me same error Message: ReferenceError: Can't find variable: Intl Reading many post, but I'm still with the same problem "react-native":…
6
votes
1 answer

Intl.numberformat in React native works fine when running in ios but not in android

I am developing an app with React Native to run on IOS and Android. I use Intl.numberformat() to print currency, and it works smoothly when the app runs on IOS, but I get this error when running on Android: ReferenceError: Can't find variable:…
HuLu ViCa
  • 5,077
  • 10
  • 43
  • 93
6
votes
1 answer

Excel custom format: What does [$€-2] mean?

Okay, this is just weird. I know from the post here that a [$-409] is a locale modifier for dates. Great. Here in Europe, I've seen [$€-2]...which is meant to be the Euro symbol. How is all the other stuff around it parsed? I've now had someone…
Ken Corey
  • 61
  • 2
6
votes
3 answers

Internationalization Flutter by intl

I've learned flutter. I built an internationalized app using the intl dependency (follow this) I run 1st command well (no error message): flutter packages pub run intl_translation:extract_to_arb --output-dir=lib/l10n lib/main.dart 3 files were…
Mr Special
  • 1,576
  • 1
  • 20
  • 33
6
votes
1 answer

PHP date format with intl-aware day suffix?

Sorry if this is a dupe - lots of similar questions but obviously if I could find an exact answer I wouldn't be asking :) Note I'm coming from .Net and am a PHP newbie, so there may be noob-scale errors. I would like to be able to output e.g. new…
1 2
3
28 29