Bitrix Site Manager

CLanguage::SelectBox

string
CLanguage::SelectBox(
 string name,
 string value,
 string default_value = "",
 string js_function = "",
 string add_to_select = "class=typeselect"
)

The method SelectBox returns the HTML code containing the drop-down list of languages (the select tag).

Parameters

ParameterDescription
name Name of the drop-down list:
<select name="name" ...>
value Current value (to initialize the selected option).
default_value If specified, it will be rendered as the first item in the list (for example: select language).
Optional.  Empty by default.
js_function Name of JS function which is to be called upon selecting an item in the drop-down list:
<select OnChange="js_function" ...>
Optional. Empty by default.
add_to_select An arbitrary HTML code which is to be added to the select tag:
<select add_to_select ...>
Optional. The standard CSS class is used for the drop-down lists of administrative section by default. 

Example



<table>
  <tr>
    <td>Language:</td>
    <td><?=CLanguage::SelectBox("LANGUAGE", LANGUAGE_ID)?></td>
  </tr>
</table>