Add
bool CCurrencyLang::Add( array arFields );
The Add method is used to add new language-dependent parameters to currency.
Method parameters
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:
|
Returned values
Returns true on success, or false otherwise.
Examples of use
<? $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, update // 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); ?>
© «Bitrix24», 2001-2024