Programmer's Reference Guide
| What makes a currency? |
Where is the currency?
The position where the currency sign or name will be displayed depends on the locale. Still, when you want to define this setting yourself you have to use the display option and provide one of the following constants:
| Constant | Description |
|---|---|
| STANDARD | Sets the standard position as defined within the locale |
| RIGHT | Displays the currency representation at the right side of the value |
| LEFT | Displays the currency representation at the left side of the value |
Example #1 Setting the currency position
Let's assume that your client has again set "en_US" as locale. Using no option the returned value could look like this:
So by using the default setting the currency (in our case $) could either be rendered left or right from the value. Now let's define a fixed position:
Note that in the second snippet the position of USD is fixed regardless of the used locale or currency.
| What makes a currency? |
Select a Version
Languages Available
Components
Search the Manual
Navigation
- Zend Framework手册 中文版
- Zend Framework手册 中文版
- Zend Framework Reference
- Zend_Currency
- Zend_Currency 简介
- 如何使用货币
- Options for currencies
- What makes a currency?
- Where is the currency?
- How does the currency look like?
- How much is my currency?
- Calculating with currencies
- Exchanging currencies
- Additional informations on Zend_Currency
