Sort countries by locale, according to user's language and country settings, using already existing method to determine locale

This commit is contained in:
Nathan Gray 2015-03-25 18:49:16 +00:00
parent dd5ce3e58d
commit 7cf73e6967

View File

@ -459,13 +459,12 @@ class country
if(class_exists('Collator') && class_exists('Locale')) if(class_exists('Collator') && class_exists('Locale'))
{ {
$col = new \Collator($GLOBALS['egw_info']['user']['preferences']['common']['lang'].'_'. $col = new \Collator(common::setlocale());
$GLOBALS['egw_info']['user']['preferences']['common']['country']);
$col->asort($this->countries_translated); $col->asort($this->countries_translated);
} }
else else
{ {
asort($this->countries_translated); natcasesort($this->countries_translated);
} }
} }
} }