Caution: The documentation you are viewing is
for an older version of Zend Framework.
You can find the documentation of the current version at docs.zendframework.com
How does the currency look like? - Zend_Currency
How the value of a currency will be rendered depends mainly on the used locale. There are several informations which are set by the locale. Each of them can manually be overridden by using the proper option.
For example, most locales are using the Latin script for rendering numbers. But there are languages like "Arabic" which are using other digits. And when you have an Arabic website you may also want to render other currencies by using the Arabic script. See the following example:
Example #1 Using a custom script
Let's expect that we are again using our "Dollar" currency. But now we want to render our currency by using the Arabic script.
For more informations about available scripts look into Zend_Locale's chapter about numbering systems.
But also the formatting of a currency number (money value) can be changed. Per default it depends on the used locale. It includes the separator which will be used between thousands, which sign will be used as decimal point, and also the used precision.
There are two ways to define the format which will be used. You can either give a locale or define a format manually.
When you are using a locale for defining the format all is done automatically. The locale 'de', for example, defines '.' as separator for thousands and ',' as decimal point. Within English this is reversed.
When you define it manually then you must conform the format as described in this chapter about localizing. See the following:
In the above snippet we deleted the separator and also the precision.