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

How to use &nbsb; in react-intl

How can you use   when using react-intl so control word breaking. I have a message like Rs. 100,00,000 but it is breaking on Rs. is there anyway in can write the message as Rs. 100,00,000 When I try doing that it displays the…
Qais Palekar
  • 71
  • 2
  • 4
4
votes
2 answers

Ember : Could not find module `@ember-intl/intl-relativeformat` imported from `ember-intl/services/intl`

I added the module ember-intl in my app since the ember-i18n is deprecated. so yarn works well, updates package.json and yarn.lock (i got rid of the package.lock), but i get this error on the browser's console after a successful ember build: Error:…
Ty Kayn
  • 719
  • 7
  • 24
4
votes
1 answer

Installing intl on OS X 10.6.6: Invalid library (maybe not a PHP library) intl.so

I'm trying to install the PHP extension intl on my fresh install of OS X 10.6.6, using the PHP version that shipped with it (v5.3.3). I know that the extension needs ICU so I installed it with homebrew. My installed version of ICU is 4.4.1 and is…
Sebastian
  • 41
  • 1
  • 3
4
votes
1 answer

CakePHP command line doesn't work when xdebug loaded

I'm trying to use xdebug against PHP 7.1.6 to troubleshoot a failing unit test in my CakePHP v3.3.6 project. I've set up xdebug using the following settings: [xdebug] xdebug.remote_enable = on xdebug.remote_host = 127.0.0.1 xdebug.remote_port =…
Joshua Walsh
  • 1,915
  • 5
  • 25
  • 50
4
votes
0 answers

React Redux Router Intl keep locale synced between intl state and router state

I have an app using React, Redux, React-Router and Intl (also react-intl, react-intl-redux, react-router-redux, react-redux). The basic setup, nothing fancy, I guess.
Tiberiu Maxim
  • 1,474
  • 14
  • 24
4
votes
2 answers

How to get ISO8601-presentation for date using ICU-string in javascript?

Are there a robust and crutch-less way to print Date inside the ICU-message string, using ISO-8601 format - YYYY-MM-DDThh:mm:ss? Subquestion 1: are other custom format string supported? Subquestion 2: why Intl.DateTimeFormat doesn't support custom…
maxkoryukov
  • 4,205
  • 5
  • 33
  • 54
4
votes
1 answer

Localizing a currency range

A combination of formatjs & javascript's native Intl.NumberFormat() supports formatting of numbers as currency in various cultures and units. But how can I format a range of currency as $1,000.00 - 5000.00. Without repeating the symbol, where ever…
Jason Kleban
  • 20,024
  • 18
  • 75
  • 125
4
votes
1 answer

How to hide decimal part of the localizedcurrency filter in twig

I am using the filter localizedcurrency to format a price in a multi language website. Since this is the price of houses, I don't need the decimal part. I can't find out how to hide it, besides using the replace filter. I wonder if there is a…
Oylex
  • 314
  • 5
  • 20
4
votes
0 answers

Twig: how to localize time_diff filter

How to translate time_diff Twig filter? I've setup all the needed to localize templates. In fact, if I use localizeddate the date is formatted following the localevariable I've set. But, how to translate time_diff? This is the code I'm using:
Aerendir
  • 6,152
  • 9
  • 55
  • 108
4
votes
1 answer

How can i enable php extension with .htaccess file

I need to enable php_intl extension only in a subdomain of my website, so i use the .htaccess file to do it with this code. php_extension_dir php_intl.dll php_extension php_intl.dll But not work. Someone…
user3332475
  • 55
  • 1
  • 2
  • 10
4
votes
2 answers

Installing PHP INTL in mac not getting it right

I have installed php56-intl using Homebrew like so: brew install php56-intl and when I do php -m | grep intl it gives me intl But when I check in my phpinfo() file, doesn't show up intl. Not sure what am I missing. Update All I want to install intl…
Adarsh Khatri
  • 358
  • 1
  • 5
  • 23
4
votes
1 answer

IntlDateFormatter::parse doesn't work?

I'm trying to parse date and I get wrong timestamp
alexfv
  • 1,826
  • 2
  • 19
  • 22
4
votes
2 answers

Javascript Intl DatetimeFormatter as (ISO_8601|custom) output pattern

I want to use Intl.DateTimeFormat but with custom pattern for output. I use this method for php version of ICU dateformat and it's work well. $fmt = datefmt_create( 'fa_IR@calendar=persian', IntlDateFormatter::FULL, …
4
votes
1 answer

Converting non-Gregorian dates using IntlDateFormatter

How should I convert a non-Gregorian date to other calender types using IntlDateFormatter. I want convert "1392-01-02" from persian to islamic calender. I tried the following code but it does not convert the calendar: $formatter =…
Handsome Nerd
  • 17,114
  • 22
  • 95
  • 173
4
votes
2 answers

PHP Spoofchecker class

I'm reading through the PHP manual and came across the Spoofchecker class in the intl extension documentation pages. The methods in the class, their parameters, as well as the class itself are all fairly undocumented as of right now so I'm wondering…
rink.attendant.6
  • 44,500
  • 61
  • 101
  • 156