Skip to end of metadata
Go to start of metadata

<p>I18N 2.0</p>

<p>I18N consists of several components:<br />
Zend_Currency<br />
Zend_Date<br />
Zend_Locale<br />
Zend_Translator<br />
Filters<br />
Validators</p>

<p>The main goal is to provide a loose coupling of the components which means that I18N is only loaded when its really used. In past several components like Zend_Date or Zend_Currency used localisation even when it was not really needed.<br />
This will change with ZF2. Another goal is to use native methods from the new I18n classes in php to increase performance.</p>

<p>The main features are as follows:</p>

<ul>
<li>Zend_Locale
<ul class="alternate">
<li>use native localisation from php (Intl)</li>
<li>use adapters (Intl and Cldr) to choose the wished depth of localisation</li>
<li>add CLDR 2.0 and above</li>
<li>unify translation (not 10 different methods)</li>
<li>allow use date and number formatting from php (by Intl)</li>
<li>add script handling</li>
</ul>
</li>
</ul>

<ul>
<li>Zend_Translator
<ul class="alternate">
<li>all changes already done</li>
</ul>
</li>
</ul>

<ul>
<li>Zend_Currency
<ul class="alternate">
<li>allow to use currency without I18n</li>
<li>allow to use php money formating</li>
</ul>
</li>
</ul>

<ul>
<li>Zend_Date
<ul class="alternate">
<li>use localisation only on request</li>
<li>use php DateTime</li>
<li>simplify API (lesser methods)</li>
<li>test performance when class is divided into date, time and datetime like in java</li>
</ul>
</li>
</ul>

Labels:
None
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
  1. Sep 16, 2011

    <blockquote><ul>
    <li>use native localisation from php (Intl)</li>
    <li>use php DateTime</li>
    </ul>
    </blockquote>
    <p>A dream comes true! <ac:emoticon ac:name="smile" /></p>

    <p>Thanks for your work.</p>

    1. Nov 07, 2011

      <p>The work in not finished for now.<br />
      But thank you for the flowers. <ac:emoticon ac:name="smile" /></p>

  2. Oct 03, 2011

    <blockquote><p>* Zend_Currency</p></blockquote>
    <blockquote><p>allow to use currency without I18n</p></blockquote>

    <p>If this means I can show KRW in the US without having to manually remove the decimals, I will be very happy. <ac:emoticon ac:name="laugh" /></p>

    1. Nov 07, 2011

      <p>I don't know what you mean with KRW but the reason or idea behind this comment is that localization and numeric represenation are seperated. The value (let's say amount of money) and how to display the value (currency represenation) are two different things.</p>

      1. Nov 07, 2011

        <p>Yes indeed. But some numeric representations don't make sense, i.e. there are no fractions of a KRW, but if I display KRW in the US, ZF1 Zend_Currency wants to show me two decimals. Just because my currency typically has two decimals, does't mean I want to display every other currency with the same precision!</p>

        <p>anyway, thanks for the work! I'm looking forward to it and hopefully I can spare a few cycles to help out!</p>

        1. Nov 08, 2011

          <p>I have to disagree... when you have a currency value then you will always have to deal with fractions.</p>

          <p>You can't say that when you want to display a currency value (only the value without localization) that there is no fraction.</p>

          <p>You would loose all cents. And the problem is also that different countries use different fractions. Even when you are working without localization that amount itself uses internally a fraction of 5. Look at common ERP systems like SAP or NAVISION for example.</p>

          <p>Within ZF1 the fraction is part of the localization and can be changed by your own represenation. You can set yourself which precision you want to use.</p>

          <p>This is no reason to disallow using of fractions within the numeric representation as it would technically mean that we only allow integers but no floats.</p>

          1. Nov 08, 2011

            <p>I know this has been discussed on the mailing list and elsewhere (i.e. <a href="http://framework.zend.com/issues/browse/ZF-10038">ZF-10038</a>)</p>

            <p>In the same way that I can not charge a 100th of a cent to a USD or EUR credit card, I can't charge a fraction of KRW to a KRW credit card. I'm certainly not proposing that we shouldn't support float values for currency (? not sure where that impression came from) .. but the ZF implementation requires you to track the precision for every currency and adjust the value that Zend_Currency provides in order to present a valid value to the customer. Seems an unwieldy and unnecessary hack that I was hoping we could avoid in ZF2. To the same token, if I present a EUR value to a Korean customer, it would make no sense to drop the precision to 0 just because the KRW does not contain any cents.</p>

            <p>I guess I'm saying that I hope we can implement precision aside from a display decision and more integral to a currency definition so we can develop cross-currency applications without additional logic outside the Zend\Currency implementation.</p>

            <p>The precision is a property of the currency, not the locale.</p>