bool CCurrencyLang::Add( array arFields );
The method Add is used to add new language dependent parameters to currency.
Parameter | Description |
---|---|
arFields | Associated array of the currency parameters whose keys are the
parameter names and values are the parameter values. The following keys are possible:
|
Returns true on success, or false otherwise.
<? $arFields = array( "FORMAT_STRING" => "# USD", // symbol # is replaced with "# USD", // with the real amount when displaying "FULL_NAME" => "Dollar", "DEC_POINT" => ".", "THOUSANDS_SEP" => "\xA0", // NBSP "DECIMALS" => 2, "CURRENCY" => "USD", "LID" => "en" ); // If the record exists, modify // or add a new one otherwise $db_result_lang = CCurrencyLang::GetByID("USD", "en"); if ($db_result_lang) CCurrencyLang::Update("USD", "en", $arFields); else CCurrencyLang::Add($arFields); ?>
© 2001-2005 Bitrix | Bitrix Site Manager - Content Management & Portal Solutions |