From b798327eecea24930e4d423e622bec4b34739724 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Mon, 18 Apr 2016 22:44:10 +0000 Subject: [PATCH] Get fallback country from locale, rather than language Fixes problems with EN is not a country. --- preferences/inc/class.preferences_hooks.inc.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/preferences/inc/class.preferences_hooks.inc.php b/preferences/inc/class.preferences_hooks.inc.php index 1f76b4840a..616c4dc42f 100644 --- a/preferences/inc/class.preferences_hooks.inc.php +++ b/preferences/inc/class.preferences_hooks.inc.php @@ -91,7 +91,8 @@ class preferences_hooks $lang = setup::get_lang(); if (empty($lang)) $lang = 'en'; list(,$country) = explode('-',$lang); - if (empty($country)) $country = $lang; + if (empty($country)) $country = Locale::getRegion(Locale::getDefault()); + if (empty($country)) $country = 'de'; } // check for old rte_font_size pref including px and split it in size and unit if (!isset($GLOBALS['egw_setup']) &&