Bitrix Site Manager

CLanguage::GetList

CDBResult
CLanguage::GetList(
 string &by = "sort",
 string &order = "asc",
 array filter = array()
)

The method GetList returns the list of languages as the CDBResult instance.

Parameters

ParameterDescription
by Name of the field by which the list is to be sorted. The following values are possible:
  • lid - by language ID;
  • active - by the active state flag;
  • name - by name;
  • def - by the default language flag.
Órder Sort order. The following values are possible:
  • asc - ascending;
  • desc - descending.
filter An array of the format Array("filtered field"=>"value" [, ...]). Filtered field can have the following values:
  • LID - double-character language ID;
  • NAME - name of the language;
  • ACTIVE - active state flag (Y|N).

See Also

Example



<?
$rsLang = CLanguage::GetList($by="sort", $order="desc", Array("NAME" => "russian"));
while ($arLang = $rsLang->Fetch())
{
  echo "<pre>"; print_r($arLang); echo "</pre>";
}
?>