Hi,
For fixing this, you should add this code :
public function getCountriesList(){
$lang = JFactory::getLanguage();
$locale = $lang->getLocale();
$countryCode = $locale[2];
$countryLangExtension = "";
$lang->load( 'com_community.country');
if (!defined('COUNTRY_LANG_AVAILABLE')) {
define('COUNTRY_LANG_AVAILABLE', 1);
}
$countryListLanguage = explode(',', trim(COUNTRY_LIST_LANGUAGE) );
if(in_array($countryCode,$countryListLanguage)==COUNTRY_LANG_AVAILABLE){
$countryLangExtension = "_".$countryCode;
}
jimport( 'joomla.filesystem.file' );
$file = JPATH_ROOT .'/components/com_community/libraries/fields/countries'.$countryLangExtension.'.xml';
if( !JFile::exists( $file ) )
{
//default country list file
$file = JPATH_ROOT .'/components/com_community/libraries/fields/countries.xml';
}
$contents = JFile::read( $file );
$parser = new SimpleXMLElement($file,NULL,true);
$document = $parser->document;
$countries = $parser->countries;
// build an array with TRANSLATED country names as keys...
if(in_array('de_DE', $locale)){
//special case to sort german language
foreach($countries->country as $country){
$unwanted_array = array( 'Š'=>'S', 'š'=>'s', 'Ž'=>'Z', 'ž'=>'z', 'À'=>'A', 'Á'=>'A', 'Â'=>'A', 'Ã'=>'A', 'Ä'=>'A', 'Å'=>'A', 'Æ'=>'A', 'Ç'=>'C', 'È'=>'E', 'É'=>'E',
'Ê'=>'E', 'Ë'=>'E', 'Ì'=>'I', 'Í'=>'I', 'Î'=>'I', 'Ï'=>'I', 'Ñ'=>'N', 'Ò'=>'O', 'Ó'=>'O', 'Ô'=>'O', 'Õ'=>'O', 'Ö'=>'O', 'Ø'=>'O', 'Ù'=>'U',
'Ú'=>'U', 'Û'=>'U', 'Ü'=>'U', 'Ý'=>'Y', 'Þ'=>'B', 'ß'=>'Ss', 'à'=>'a', 'á'=>'a', 'â'=>'a', 'ã'=>'a', 'ä'=>'a', 'å'=>'a', 'æ'=>'a', 'ç'=>'c',
'è'=>'e', 'é'=>'e', 'ê'=>'e', 'ë'=>'e', 'ì'=>'i', 'í'=>'i', 'î'=>'i', 'ï'=>'i', 'ð'=>'o', 'ñ'=>'n', 'ò'=>'o', 'ó'=>'o', 'ô'=>'o', 'õ'=>'o',
'ö'=>'o', 'ø'=>'o', 'ù'=>'u', 'ú'=>'u', 'û'=>'u', 'ý'=>'y', 'þ'=>'b', 'ÿ'=>'y' );
$countriesSorted[strtr( trim(JText::_($country->name)), $unwanted_array )] = $country->name;
}
ksort($countriesSorted);
//after sorting, we need to bring back the umlaut character
$tmpArr = array();
foreach($countriesSorted as $key=>$country){
$tmpArr[JText::_($country)] = trim($country);
}
$countriesSorted = $tmpArr;
}else{
foreach($countries->country as $country){
$countriesSorted[JText::_($country->name)] = $country->name;
}
uasort($countriesSorted, 'CStringHelper::compareAscii');
}
return $countriesSorted;
}please provide me the FTP access..
the FTP is not working, is there any special setting?
Command: TYPE I
Response: 200 TYPE is now 8-bit binary
Command: PASV
Response: 227 Entering Passive Mode (50,87,239,221,189,224)
Command: MLSD
Error: Connection timed out after 20 seconds of inactivity
Error: Failed to retrieve directory listingok, provide me the cPanel access
Please check again, I already fix it