You are here

function theme_currency_api_amount in Currency 7

Same name and namespace in other branches
  1. 6 currency_api/currency_api.module \theme_currency_api_amount()

Custom theme to display currency amount.

Default output example: $200.00 USD

Parameters

string $amount:

array $attributes:

Return value

string Formatted string.

File

currency_api/currency_api.module, line 405
This module provides an API for currency conversion.

Code

function theme_currency_api_amount($amount, $attributes) {
  return t('!symbol!amount !code', array(
    '!symbol' => $attributes['symbol'],
    '!amount' => number_format($amount, $attributes['decimals']),
    '!code' => $attributes['code'],
  ));
}