Bitrix Site Manager

CLanguage::Update

bool
CLanguage::Update(
 int id,
 array fields
)

The method Update modifies language settings. In case of an error the method will return false, and the LAST_ERROR property will contain the error description.

Parameters

ParameterDescription
id Double-character language ID.
fields An array of the field values in the format array("field"=>"value" [, ...]).

See Also

Example



<?
$arFields = Array(
  "ACTIVE"           => "Y",
  "SORT"             => 100,
  "DEF"              => "N",
  "NAME"             => "English",
  "FORMAT_DATE"      => "MM/DD/YYYY",
  "FORMAT_DATETIME"  => "MM/DD/YYYY HH:MI:SS",
  "CHARSET"          => "iso-8859-1"
  );
$obLang = new CLanguage;
$obLang->Update("en", $arFields);
if (strlen($obLang->LAST_ERROR)>0) $strError .= $obLang->LAST_ERROR;
?>