What makes a currency?The currency consists of several informations. A name, a abbreviation and a sign. Each of these could be relevant to be displayed, but only one at the same time. It would not be a good practice to display something like "USD 1.000 $". Therefor Zend_Currency supports the definition of the currency information which has to be rendered. The following constants can be used:
Example #1 Selecting the currency description Let's assume that your client has again set "en_US" as locale. Using no option the returned value could look like this: By giving the proper option you can define what information which has to be rendered. Without providing the display the currency sign will be used when rendering the object. When the currency has no sign, the abbreviation will be used as replacement.
Sometimes it is necessary to change the default informations. You can set each of the three currency informations independently by giving the proper option. See the following example. Example #2 Changing the currency description Let's assume that your client has again set "en_US" as locale. But now we don't want to use the default settings but set our own description. This can simply be done providing the proper option: You could also set a sign or an abbreviations yourself.
|
|