/** * Using a two-letter region code, return the name of the corresponding country, * if possible. Not all region codes map to country names. * @param string $code Two-letter country code. */ public static function getCountry($code) { if (self::$_countries === null) { // list of country names in user's language self::$_countries = self::$_userLocale->getCountryTranslationList(); // country code index of current user for array above } if (isset(self::$_countries[$code])) { return self::$_countries[$code]; } return ''; }