Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:36877 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 35678 invoked from network); 8 Apr 2008 17:04:48 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 8 Apr 2008 17:04:48 -0000 Authentication-Results: pb1.pair.com header.from=stas@zend.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=stas@zend.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 212.25.124.162 as permitted sender) X-PHP-List-Original-Sender: stas@zend.com X-Host-Fingerprint: 212.25.124.162 mail.zend.com Windows 2000 SP4, XP SP1 Received: from [212.25.124.162] ([212.25.124.162:3342] helo=mx1.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 36/37-34006-EA5ABF74 for ; Tue, 08 Apr 2008 13:04:47 -0400 Received: from us-ex1.zend.com ([192.168.16.5]) by mx1.zend.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 8 Apr 2008 20:05:22 +0300 Received: from [192.168.16.94] ([192.168.16.94]) by us-ex1.zend.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 8 Apr 2008 10:05:18 -0700 Message-ID: <47FBA5A7.1070600@zend.com> Date: Tue, 08 Apr 2008 10:04:39 -0700 Organization: Zend Technologies User-Agent: Thunderbird 2.0.0.12 (Windows/20080213) MIME-Version: 1.0 To: Pierre Joye CC: Andi Gutmans , Lester Caine , PHP internals References: <47F463F0.4030407@zend.com> <47F47360.8040606@lsces.co.uk> <47F560E4.7060609@zend.com> <47F5DC3D.6090302@lsces.co.uk> <47F677D9.4070804@zend.com> <47F68136.8040908@zend.com> <698DE66518E7CA45812BD18E807866CE0175729A@us-ex1.zend.net> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 08 Apr 2008 17:05:18.0959 (UTC) FILETIME=[B91A6FF0:01C8999A] Subject: Re: [PHP-DEV] intl naming From: stas@zend.com (Stanislav Malyshev) Hi! > The ICU API solves this issue nicely using the current locale. It > would be easier to work with the intl API if the same principle was > used. Add a Locale::setDefault() and Locale::getDefault(). You can use default locale, of course, and Locale class already has these functions. http://docs.php.net/manual/en/class.locale.php > The argument order for the constructors/factories should be change to > allow that. The locale argument has to be optional (and moved as 2nd+ > argument). I'm afraid that wouldn't work since functions have variable number of arguments and we want consistent API across all modules. > Arguments order may be confusing and hard to remember. However their Like "locale goes first"? > 4. Support of Date Object, they are the standard DateTime type in PHP. Planned to be done later - if anybody wants to contribute now, please do. It is indeed very important, we just don't have somebody to do it right now. > 5. Error management is rather unintuitive. I can't imagine to have to > check the error code after each call. Exceptions can greatly improve Like 99% people do with 99% functions in PHP? You must be really suffering not writing code in Java :) > 6. What's about a __toString implementation when possible. It may be If you can propose good toString - and especially if you have volunteer to implement it :) - why not? We didn't have good use for toString, but if you find one - welcome. > Prepare: > $invoice_line_amount = new NumberFormatter( 'fr_CH', > NumberFormatter::DECIMAL ); > $invoice_line_amount->setValue($res); > > View: > echo $invoice_line_amount; We didn't purport to implement yet another MVC templating system here. We wrote ICU wrapper. > Locale specific: > - Being able to parse, fetch and manage Locale IDs in a consistent and > portable way would rock, the ISO3 related API is a must have prior > 1.0. It can be used from day #1 to normalize locale IDs format. Could you elaborate? I think our functions understand locales in standard formats, but maybe you mean something else. -- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com