Documentation

GetCountryByID

string
GetCountryByID(
 int cid,
 string lang = LANGUAGE_ID
)

The function returns a name of the specified country by its ID.

Note. Numeric country IDs can be found in the /bitrix/modules/main/lang/language_id/tools.php file.

Function parameters

ParameterDescription Available from version
id Country numeric ID.
lang Language ID in which the country name is to be returned.
Optional parameter. The default value is [link=6658210#language_id]LANGUAGE_ID[/link] (current language).

Examples of use

<?
echo GetCountryByID(34, "br"); // Brasil
?>


© «Bitrix24», 2001-2022
Up