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
14
votes
4 answers

How to import intl library in Flutter?

I am new in Flutter. When I import the library: import 'package:intl/intl.dart'; , it says that the target of URI doesn't exist:package:intl/intl.dart;
TSR
  • 17,242
  • 27
  • 93
  • 197
14
votes
3 answers

Can't install php Intl extension on MacosX

I'm following this link to install this PHP extension but I'm stuck in the middle. When I try to run this command pecl install intl I get this message: Specify where ICU libraries and headers can be found [DEFAULT] : And I don't know where the ICU…
SlimenTN
  • 3,383
  • 7
  • 31
  • 78
13
votes
1 answer

Failed to write error when installing intl extension on Os x El Capitan

I'm trying to install intl extension on Os x El Capitan. Every time i run sudo pecl install intl, i'm getting following error on the last step. I don't know why the copy operation failed. Is it a bug or am i missing something? Any help is really…
mocak
  • 405
  • 2
  • 5
  • 12
13
votes
2 answers

Localized (short) month names using IntlDateFormatter in PHP?

On my Windows development machine, I have set the locale to ita: setlocale(LC_TIME, 'ita'); echo strftime('%b'); // dic While (I suppose, can't test right now) on a *nix system, I should use it: setlocale(LC_TIME, 'it'); If I try to set it on my…
gremo
  • 47,186
  • 75
  • 257
  • 421
12
votes
3 answers

gettext() equivalent in Intl library?

I'm looking for a way to to do i18n and l10n. I've used gettext before and it was good: I would simply create .mo files in different languages and everything that needed to be translated would be in this notation: echo __('string to be…
Stann
  • 13,518
  • 19
  • 65
  • 73
11
votes
1 answer

currencyDisplay must be either "code", "symbol", or "name" - Safari issue

I am trying to use global Intl constructor for formatting values with currencies. But it appears to be currencyDisplay:'narrowSymbol' doesn't supported and work in Safari but works fine in Chrome. The following error is returned in the console:…
Jamil Alisgenderov
  • 1,448
  • 2
  • 12
  • 23
11
votes
2 answers

Flutter - Converting minutes into H:M

I'm looking for a method to convert minutes into hours and minutes. I'm using the intl package through DateFormat but this requires both hours and minutes so it won't do. If I have 100 minutes, I would like this to be converted to 01:40. Thanks
Jake
  • 1,906
  • 9
  • 32
  • 60
11
votes
1 answer

Problems to install php intl with Xampp (MacOs)

I´m installed Xampp in my Mac, the last version with Php7, all works fine, but in my Php proyect I´m using this function: numfmt_format_currency() I need install the intl, and edit the php.ini with this line: extension="intl.so” The problem is, I…
RichardMiracles
  • 2,032
  • 12
  • 28
  • 46
11
votes
1 answer

How can I change NumberFormatter::parseCurrency() behavior of accepting white space and non breaking space?

I'm trying to parse localized currency strings to currency and float value. Everything works well for a while, now we experiencing some problems. It seems that NumberFormatter::parseCurrency uses an additional invisible…
nofreeusername
  • 267
  • 1
  • 12
10
votes
1 answer

List of available collators in PHP?

I am considering using collators in PHP (I am no expert in PHP). Is there a way to know/list all collators available in PHP? I am looking for something similar to Java's Collator.getAvailableLocales(). Thanks.
Jérôme Verstrynge
  • 57,710
  • 92
  • 283
  • 453
10
votes
2 answers

Intl.NumberFormat currency: $US currency symbol?

I don't understand how NumberFormat works. In France we never use $US so why do I get the following? new Intl.NumberFormat("fr-FR",{ style: 'currency', currency: 'USD', minimumFractionDigits: 2, …
Sebastien Lorber
  • 89,644
  • 67
  • 288
  • 419
10
votes
2 answers

NumberFormatter::SPELLOUT spellout-ordinal in russian and italian

this code works for english, spanish and german ordninal numbers, but with russian or italian ordninal numbers it doesn't work. 'ru-RU','it-IT' also don't work I get for example in russian for 2 -> два (this is the cardinal number) , but I want the…
Grischa
  • 70
  • 8
  • 26
10
votes
1 answer

PHP NumberFormatter Slovenian spellout wrong

I am trying to spellout an integer amount into Slovenian words (for postal declarations) using the NumberFormatter class from the intl package, but the result is completely wrong and makes no sense. $fmt = new NumberFormatter('sl',…
SlimDeluxe
  • 733
  • 8
  • 18
10
votes
3 answers

PHP 5.3 seems to be missing Intl extension by default

My system is Ubuntu 12.04, PHP 5.3, and I'm trying to run some basic Intl code like this:
Desmond Hume
  • 8,037
  • 14
  • 65
  • 112
9
votes
3 answers

Xampp Intl extension on windows 10 can't be installed

I try to install Megento 2 on Xampp (php 7.2.5) and through installation process I find Intl extension installation error I did every thing ;extension=intl to be extension=intl in php.ini also I copied all files icu*.dll files from xampp/php to…
Gouda Elalfy
  • 6,888
  • 1
  • 26
  • 38
1
2
3
28 29