+--------------------------------------------------------------------+
| CiviCRM version 4.7 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2016 |
+ | Copyright CiviCRM LLC (c) 2004-2017 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2016
+ * @copyright CiviCRM LLC (c) 2004-2017
* $Id$
*
*/
*
* @return CRM_Core_Smarty
*/
- private function __construct() {
+ public function __construct() {
parent::__construct();
}
$this->assign_by_ref('config', $config);
$this->assign_by_ref('session', $session);
- global $tsLocale;
+ $tsLocale = CRM_Core_I18n::getLocale();
$this->assign('tsLocale', $tsLocale);
// CRM-7163 hack: we don’t display langSwitch on upgrades anyway
return $this;
}
+ /**
+ * Get the locale for translation.
+ *
+ * @return string
+ */
private function getLocale() {
- global $tsLocale;
+ $tsLocale = CRM_Core_I18n::getLocale();
if (!empty($tsLocale)) {
return $tsLocale;
}