Usage: $countryname(country_code[,translate])
Category: text
Implemented: Picard 2.7


Returns the name of the country for the specified country code. If the country code is invalid an empty string will be returned. If translate is not blank, the output will be translated into the current locale language, otherwise it will be in English.


Assuming that the user’s locale has been set to Russian, the following statements will return the values indicated:

$countryname(%foo%)        ==>  "Canada"
$countryname(%foo%,yes)    ==>  "Канада"
$countryname(ca)           ==>  "Canada"
$countryname(ca,)          ==>  "Canada"
$countryname(ca, )         ==>  "Канада"
$countryname(ca,yes)       ==>  "Канада"
$countryname(INVALID)      ==>  ""
$countryname(INVALID,yes)  ==>  ""