Currency engine

klevu.extend( target [, object1 ] [, objectN ] )
Returns: Object

Description:  The currency engine is an implementation of the dictionary engine  refer to the dictionary docs for an in-depth view.

The map of a currency element, with defaults:

  • atEnd: false – controls if the symbol is after the value
  • code: “<string>” – same as the global name
  • decimal: “.” – symbol to be used in the decimal place
  • format: “%s%s” – the format of the currency, can only contain 2 elements
  • grouping: 3 – thousand decimal grouping
  • precision: 2 – rounding on x decimal
  • string: “<simbol>” – the symbol to be used for the currency
  • thousand: “,” – symbol to be used in the thousand place

Specific functions for the engine:

  • addCurrency – used to add a single currency object – addCurrency : function ( Code , Map )
  • setCurrencies – used to set a list of currencies
  • processCurrency – retrieves the string of the formatted value in the selected currency code –  processCurrency : function ( code , value ) 

All of the Dictionary engine interfaces are available on the Currency engine

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>