Horde_Icalendar_Vcard::ADR_POSTCODE => isset($hash['commonPostalCode'])
? $hash['commonPostalCode'] : '',
Horde_Icalendar_Vcard::ADR_COUNTRY => isset($hash['commonCountry'])
- ? Turba_Driver::getCountry($hash['commonCountry']) : '',
+ ? Horde_Nls::getCountryISO($hash['commonCountry']) : '',
);
$val = implode(';', $a);
Horde_Icalendar_Vcard::ADR_POSTCODE => isset($hash['homePostalCode'])
? $hash['homePostalCode'] : '',
Horde_Icalendar_Vcard::ADR_COUNTRY => isset($hash['homeCountry'])
- ? Turba_Driver::getCountry($hash['homeCountry']) : '',
+ ? Horde_Nls::getCountryISO($hash['homeCountry']) : '',
);
$val = implode(';', $a);
Horde_Icalendar_Vcard::ADR_POSTCODE => isset($hash['workPostalCode'])
? $hash['workPostalCode'] : '',
Horde_Icalendar_Vcard::ADR_COUNTRY => isset($hash['workCountry'])
- ? Turba_Driver::getCountry($hash['workCountry']) : '',
+ ? Horde_Nls::getCountryISO($hash['workCountry']) : '',
);
$val = implode(';', $a);
}
/**
- * Returns the (localized) country name.
- *
- * @param string $country The two-letter country code.
- *
- * @return string The country name or the country code if a name cannot be
- * found.
- */
- function getCountry($country)
- {
- static $countries;
- if (!isset($countries)) {
- include 'Horde/Nls/Countries.php';
- }
-
- return isset($countries[$country]) ? $countries[$country] : $country;
- }
-
- /**
* Function to convert a Horde_Icalendar_Vcard object into a Turba
* Object Hash with Turba attributes suitable as a parameter for add().
*
$message->homepostalcode = Horde_String::convertCharset($hash['homePostalCode'], $charset, 'utf-8');
break;
case 'homeCountry':
- $message->homecountry = Horde_String::convertCharset(self::getCountry($hash['homeCountry']), $charset, 'utf-8');
+ $message->homecountry = Horde_String::convertCharset(Horde_Nls::getCountryISO($hash['homeCountry']), $charset, 'utf-8');
break;
case 'workStreet':
$message->businessstreet = Horde_String::convertCharset($hash['workStreet'], $charset, 'utf-8');