class CRM_Admin_Form_Setting_Localization extends CRM_Admin_Form_Setting {
protected $_settings = array(
+ 'contact_default_language' => CRM_Core_BAO_Setting::LOCALIZATION_PREFERENCES_NAME,
'countryLimit' => CRM_Core_BAO_Setting::LOCALIZATION_PREFERENCES_NAME,
'customTranslateFunction' => CRM_Core_BAO_Setting::LOCALIZATION_PREFERENCES_NAME,
'defaultContactCountry' => CRM_Core_BAO_Setting::LOCALIZATION_PREFERENCES_NAME,
);
}
}
- $this->addElement('select', 'contact_default_language', ts('Default Language for users'), array(
- '*default*' => ts('Use default site language'),
- 'undefined' => ts('Leave undefined'),
- 'current_site_language' => ts('Use language in use at the time'),
- ));
+ $this->addElement('select', 'contact_default_language', ts('Default Language for users'),
+ CRM_Admin_Form_Setting_Localization::getDefaultLanguageOptions());
$includeCurrency = &$this->addElement('advmultiselect', 'currencyLimit',
ts('Available Currencies') . ' ', self::getCurrencySymbols(),
}
}
+ /**
+ * @return array
+ */
+ public static function getDefaultLanguageOptions() {
+ return array(
+ '*default*' => ts('Use default site language'),
+ 'undefined' => ts('Leave undefined'),
+ 'current_site_language' => ts('Use language in use at the time'),
+ );
+ }
+
}
// Other parameters may be specified, depending on the type.
return array(
'backtrace' => array('setting'),
+ 'contact_default_language' => array('contact_default_language'),
'countryLimit' => array('setting'),
'dashboardCacheTimeout' => array('setting'),
'dateInputFormat' => array('setting'),
'group' => 'localization',
'name' => 'contact_default_language',
'type' => 'String',
+ 'quick_form_type' => 'Select',
+ 'html_type' => 'Select',
+ 'html_attributes' => array(
+ 'class' => 'crm-select2',
+ ),
+ 'pseudoconstant' => array(
+ 'callback' => 'CRM_Admin_Form_Setting_Localization::getDefaultLanguageOptions',
+ ),
'default' => '*default*',
'add' => '4.7',
'title' => 'Default Language for contacts',