Country::getName - jcobban/Genealogy GitHub Wiki

$country->getName($language)

Up: class Country

Obtain the name of the country. This extends Record::getName. The getName method takes one optional parameter:

parameter description
$lang The 2-character ISO language code. The default is 'en'. If there is no language specific name for the Country the English name is returned.

For example:

$country        = new Country(array('code' => 'US'));
print $country->getName();     // prints "United States of America"
print $country->getName('fr'); // prints "États Unies de l'Amerique"
print $country->getName('es'); // prints "Estados Unidos del America"
print $country->getName('de'); // prints "Vereinigte Staaten von Amerika "
$country        = new Country(array('code' => 'XX'));
print $country->getName();     // prints "Country: 'XX'"

Next: class CountryName