intl

AWS Lambda Node.js Full-ICU

别说谁变了你拦得住时间么 提交于 2019-12-12 09:53:29
问题 I run node.js app localy with this command: $ node --icu-data-dir=node_modules/full-icu app.local.js How to specify icu-data-dir in AWS Lambda environment? Thanks 回答1: You should set the NODE_ICU_DATA environment variable so that it points to a directory where the correct ICU .dat file can be found. If you install the full-icu package using the node version that matches the one used by your lambdas, you should automatically get the correct .dat file. E.g. when using the runtime nodejs10.x :

Intl working fine with Symfony2 on WAMP, but shows an error in Functional Tests

萝らか妹 提交于 2019-12-11 08:05:28
问题 I have a quite strange issue here! I am using Symfony2 with WAMP. When I visualise a path, lets say mylocaldomain/blog/see_all it works fine (Intl extension on PHP works fine). However, when I build a functional test, there is this issue 500 Internal Server Error - Twig_Error_Runtime: An exception has been thrown during the rendering of a template ("The Symfony\Component\Intl\DateFormatter\IntlDateFormatter::__construct() method's argument $locale value NULL behavior is not implemented. Only

PHP-Intl acts different for PHP V7.0.20

不想你离开。 提交于 2019-12-11 02:30:05
问题 I have the following code: $lang="de-AT"; $currency="3333"; $formatter = new NumberFormatter($lang, NumberFormatter::DECIMAL); $formatter->setAttribute(NumberFormatter::MAX_FRACTION_DIGITS, 2); echo $formatter->format($currency); can be run in here with copy/paste:online php (though I don't know the php version of this site) which outputs: 3.333 and is exactly what I've expected. But on my local host with PHP 7.0.20 and PHPUnit 6.2.1 the Unit test gives me as result: 3 333 . Any idea what's

CakePHP 3.0 not running without intl extension

久未见 提交于 2019-12-11 01:45:33
问题 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 intl extension ? Is there anyway to disable it in CakePHP? Or is there any alternative that I can use ? I am into a big trouble. Please help... 回答1: if there are still problem to install php_intl, try next plugin: https://github.com/hraq/cake-intl

Installing PHP INTL in mac not getting it right

一曲冷凌霜 提交于 2019-12-10 18:29:21
问题 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 in my computer so that I could run my zend application. But whatever I do I don't get it done. An error occurred An error occurred during execution; please try again later. Additional information: Zend\I18n\Exception\ExtensionNotLoadedException

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

二次信任 提交于 2019-12-10 18:01:03
问题 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 happened: /private/tmp/pear/temp/intl/intl_error.h:24:10: fatal error: 'ext/standard/php_smart_str.h' file not found include ^ 1 error generated. make: *** [php_intl.lo] Error 1 ERROR: `make' failed No matter, did some research and found out that PHP 7.0.8 deprecated php.smart_str.h to php.smart

How can i enable php extension with .htaccess file

∥☆過路亽.° 提交于 2019-12-10 15:25:57
问题 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. <IfModule mod_php4.c> php_extension_dir php_intl.dll php_extension php_intl.dll </IfModule> But not work. Someone helpe me, please? 回答1: The directive php_extension_dir should be: php_extension_dir <path_to__php_extensions> Where <path_to_php_extensions> is the absolute path to where your PHP extensions are installed. Simply putting the file name here does nothing, since

How would I use php-intl to convert country codes to localized country names

流过昼夜 提交于 2019-12-08 08:43:02
问题 Hello I need to retrieve full country names based on a country code and a locale in PHP. Since php-intl is now supposed to be able to do this I want to use that. nl_NL nl -> Nederland uk -> Verenigd Koninkrijk en_UK nl -> The Netherlands uk -> United Kindom I think I need to use php-intl resource bundles somehow, but am unable to find any useful examples. 回答1: Exactly. The intl methods can help you with that. You need to use Locale::getDisplayRegion Object oriented style: static string Locale

Update ICU extension within xampp?

青春壹個敷衍的年華 提交于 2019-12-07 20:44:31
I'm running xampp and I need to upgrade ICU (php_intl extension) to the latest version - I downloaded 54 from the ICU page but unsure how to go about upgrading it. There is a bin , include and lib folder - where do I put these files and do I have to do anything else? To upgrade existing ICU in you XAMP installation you'll need to: copy php_intl.dll to your_xamp_folder/php copy all the icu*.dll files to your_xamp_folder/apache/bin check if extension=php_intl.dll is enabled in your_xamp_folder/php/php.ini restart Apache Let me know if it works (i'm currently on nginx) Edit: you'll find php_intl

ResourceBundle returns NULL without any errors being raised

ⅰ亾dé卋堺 提交于 2019-12-07 08:55:14
问题 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 expected result from the resource bundle class. Now I do this $bundle = '/var/www/libs/icudt48l.dat'; $resource = new \ResourceBundle('en_US', $bundle, true); var_dump($resource, is_file($bundle)); //--> NULL, TRUE The problem is $resource returns