Zend Framework の紹介

 Learning Zend Framework

appendix

 Zend Framework リファレンス


  • 第36章 Zend_Gdata
  • 第37章 Zend_Http
  • 第38章 Zend_InfoCard
  • 第39章 Zend_Json
  • 第40章 Zend_Layout
  • 第41章 Zend_Ldap
  • 第42章 Zend_Loader
  • 第43章 Zend_Locale
  • 第44章 Zend_Log
  • 第45章 Zend_Mail
  • 第46章 Zend_Markup
  • 第47章 Zend_Measure
  • 第48章 Zend_Memory
  • 第49章 Zend_Mime
  • 第50章 Zend_Navigation
  • 第51章 Zend_Oauth
  • 第52章 Zend_OpenId
  • 第53章 Zend_Paginator
  • 第54章 Zend_Pdf
  • 第55章 Zend_ProgressBar
  • 第56章 Zend_Queue
  • 第57章 Zend_Reflection
  • 第58章 Zend_Registry
  • 第59章 Zend_Rest

  • 第60章 Zend_Search_Lucene
  • 第61章 Zend_Serializer
  • 第62章 Zend_Server
  • 第63章 Zend_Service
  • 第64章 Zend_Session
  • 第65章 Zend_Soap
  • 第66章 Zend_Tag
  • 第67章 Zend_Test
  • 第68章 Zend_Text
  • 第69章 Zend_TimeSync
  • 第70章 Zend_Tool
  • 第71章 Zend_Tool_Framework
  • 第72章 Zend_Tool_Project
  • 第73章 Zend_Translate
  • 第74章 Zend_Uri
  • 第75章 Zend_Validate
  • 第76章 Zend_Version
  • 第77章 Zend_View
  • 第78章 Zend_Wildfire
  • 第79章 Zend_XmlRpc
  • ZendX_Console_Process_Unix
  • ZendX_JQuery
  • Translation 70.6% Update 2010-11-28 - Revision 23415

    25.3. Options for currencies

    Depending on your needs, several options can be specified at instantiation. All of this options have default values. But sometimes it is necessary to define how your currencies will be rendered. This includes for example:

    • Currency symbol, shortname or name:

      Zend_Currency knows all currency names, abbreviations and signs. But sometimes you could be in need to define the string which has to be displayed as replacement for a currency.

    • Currency position:

      The position of the currency symbol is automatically defined. But sometimes you could be in need to define it manually.

    • Script:

      You could define the script which shall be used to display digits. Detailed information about scripts and their usage can be found in Zend_Locale's chapter Numeral System Conversion.

    • Number formatting:

      The amount of currency (generally known as money value) is formatted by using the formatting rules defined by the locale. For example is the ',' sign in English used as separator for thousands, but in German as precision sign.

    The following list mentions all options which could be set. They can either be set at initiation or by using the setFormat() method. In any case you have to give this options as array.

    • currency: Defines the abbreviation which can be displayed.

    • display: Defines which part of the currency should be used for displaying the currency representation. There are 4 representations which can be used and which are all described in this table.

    • format: Defines the format which should be used for displaying numbers. This number-format includes for example the thousand separator. You can either use a default format by giving a locale identifier, or define the number-format manually. If no format is set the locale from the Zend_Currency object will be used. See the chapter about number formatting for details.

    • locale: Defines a locale for this currency. It will be used for detecting the default values when other settings are omitted. Note that when you don't set a locale yourself, it will be detected automatically which could lead to problems.

    • name: Defines the full currency name which can be displayed.

    • position: Defines the position at which the currency description should be displayed. The supported positions are described this section.

    • precision: Defines the precision which should be used for the currency representation. The default value depends on the locale and is for most locales 2.

    • script: Defined which script should be used for displaying digits. The default script for most locales is 'Latn', which includes the digits 0 to 9. Other scripts such as 'Arab' (Arabian) are using other digits. See the chapter about numbering systems for details and available options.

    • service: Defines the exchange service which has to be used when calculating with different currencies.

    • symbol: Defines the currency symbol which can be displayed.

    • value: Defines the currency amount (money value). Using this option you should also set the service option.

    As you can see there is much which could be changed. Still as already mentioned the default values for this settings conform the official standard for currency representation in every country.

    digg delicious meneame google twitter technorati facebook

    Comments

    Loading...