Update
bool CCurrencyLang::Update( string currency, string lang, array arFields );
The Update method updates the language-dependent parameters of the specified currency for the specified language.
Parameters
Parameter | Description |
---|---|
currency | The currency ID which language-dependent parameters are to be updated. |
lang | The language ID for which the language-dependent currency parameters are to be updated. |
arFields | Associated array of new parameters of the currency 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 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); ?>
© «Bitrix24», 2001-2024