Documentation

Add

mixed
CLanguage::Add(
 array fields
)

The method adds a new language. Returns the ID of the added language. In case of an error the method will return false, and the LAST_ERROR property will contain the error description. Non-static method.

Parameters

ParameterDescription
fields Array of field values in the array("field"=>"value" [, ...]) format.

See Also

Examples of use

<?
$arFields = Array(
  "LID"              => "en",
  "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->Add($arFields);
if (strlen($obLang->LAST_ERROR)>0) $strError .= $obLang->LAST_ERROR;
?>


© «Bitrix24», 2001-2024
Up