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
2
votes
0 answers

Why does Google webmaster render cause error: Intl is not defined

When I use Google's Webmaster tools and try to "Fetch as Google" to certain pages of my site, the site that is rendered by Google is missing a lot of data (It looks like a javascript error happens) I have an error logging system on my website that…
2
votes
2 answers

php_intl.dll not working when using php5apache2_4.dll

On a Windows 7 64bit I installed: Apache 2.4.23 x86 VC11 Thread safe php 5.6.27-Win32-VC11-x86 Apache httpd.conf: ... LoadModule php5_module "D:/devapps/php/php5apache2_4.dll" AddHandler application/x-httpd-php .php PHPIniDir…
user6638
  • 61
  • 5
2
votes
0 answers

How set the default time zone in Intl MessageFormatter

I'm using php intl MessageFormatter for translation. In some phrases I'm using date formatting, for example: some text {0,date,dd.MM.yyyy HH:mm} So, I can't understand, how set the default time zone for it. This ignores php.ini date.timezone and…
user3449979
  • 439
  • 1
  • 5
  • 7
2
votes
2 answers

Why does the JS Internationalization API for number formatting contradict German standards?

Today I became aware of the ECMAScript Internationalisation API, as I was researching a sane way to format numbers. Thus I tested for German by calling Intl.NumberFormat("de").format(10000.23) on the console in Firefox and Chrome, which provides…
Pat Mächler
  • 529
  • 4
  • 14
2
votes
1 answer

What causes date difference in PHP / Symfony2?

I have a very strange problem about datetime. The datetime stored in the database shown as valid in the form but it's wrong when normally printed. Here is my column data: delivery_date = datetime type value = 2015-11-06 13:00:00 (Y-m-d H:i:s) Here…
Canser Yanbakan
  • 3,780
  • 3
  • 39
  • 65
2
votes
1 answer

IntlDateFormatter parse doesn't work with specific params

Something strange with data 1990-03-25 and Asia/Nicosia IntlDateFormatter->parse gives false PHP 5.6.11-1+deb.sury.org~utopic+1 intl-3.0.0
Vladimir Pak
  • 658
  • 1
  • 9
  • 13
2
votes
2 answers

NumberFormatter::formatCurrency is not showing a currency symbol

I'm using NumberFormatter::formatCurrency to display formatted currency values, like this; $value = 395; $fmt = numfmt_create('en_GB', NumberFormatter::CURRENCY); echo numfmt_format_currency($fmt, $value, 'gbp'); On my Windows dev box, and Centos…
charliefortune
  • 3,072
  • 5
  • 28
  • 48
2
votes
8 answers

CakePHP 3.0 not running without intl extension

I am trying to install and run a CakePHP 3.0 project on a shared host. However, CakePHP 3.0 requires php-intl extension, but the hosting provider has denied me to install/enable intl extension on the shared hosting. How can I run CakePHP 3.0 without…
Mohit Gupta
  • 109
  • 1
  • 1
  • 11
2
votes
1 answer

DART localization library messages not working in compiled version

I am developing a CakePHP application with DART as the Frontend. I am currently using the Intl library to translate messages in French, and when launching my main.html in the Dartium browser within Eclise, the messages show up fine. However, when I…
2
votes
1 answer

Make it work: ICU/php-intl mnemonic tag "few" for pluralization formatting

ICU message formatting doesn't seem to work for me. Here's the example: $n = 22; $f = MessageFormatter::create('ru', '{n, plural, one{корова} few{коровы} many{коров} other{коров}}'); echo $n.' '.$f->format(['n' => $n])."\n"; I get 22 коров in…
Alex Kovytin
  • 513
  • 1
  • 4
  • 8
2
votes
2 answers

Install Thelia 2 on Mac with Php intl issue

I am trying to install Thelia 2 on XAMPP on Mac. However, I get stuck with the error message on step 2: I tried a lot of things and am pretty sure intl is enabled: $ php -m | grep intl intl Any idea?
bing
  • 450
  • 3
  • 6
  • 15
2
votes
1 answer

FatalErrorException: Error: Class 'ResourceBundle' not found

I installed and configured FOSUserBundle, SonataAdminBundle, SonataUserBundle, SonataMediaBundle correctly as written in here…
2
votes
2 answers

Converting a date from a calendar type to another type

I need a function to convert a date in the Persian calendar to its counterpart Gregorian date. I wrote the below function following Example #3 of this page. Unfortunately, it does not work. What is the reason and what is the correct method to do…
Handsome Nerd
  • 17,114
  • 22
  • 95
  • 173
2
votes
1 answer

Could not load the resource bundle /en_US_POSIX.res"

After deploying my Symfony 2.4 web application, I have a page where it calls to a FormType with a field type country. $builder->add('pays', 'country'); However, it crashes and I get this error: Could not load the resource bundle…
user2341382
2
votes
0 answers

PHP internationalization with intl

I'm looking for a good way to internationalize an PHP application. My conclusions so far, is that I'll not use gettext (keeps failing randomly, bad implementation of cache with lighttpd I guess) and Zend is not a option to me. I'm very interested in…
cvsguimaraes
  • 12,910
  • 9
  • 49
  • 73