Make sure default lang is set, even if not in setup

This commit is contained in:
nathangray 2016-05-27 09:31:08 -06:00
parent d9f3146371
commit c6fd40b9e0

View File

@ -93,8 +93,8 @@ class preferences_hooks
if ($hook_data['setup']) // called via setup
{
$lang = setup::get_lang();
if (empty($lang)) $lang = 'en';
}
if (empty($lang)) $lang = 'en';
list(,$country) = explode('-',$lang);
if (empty($country) && class_exists('Locale')) $country = Locale::getRegion(Locale::getDefault());
if (empty($country)) $country = 'de';