-
- // temporarily set locale to en_US to prevent spinning up gettext,
- // which would be a waste if we have custom translate function
- global $tsLocale;
- $current_locale = $tsLocale;
- // fixme:: use variable?
- $tsLocale = 'en_US';
-
- // run translation purely for escape/param replacement/etc.
- $text = CRM_Core_I18n::singleton()->crm_translate($text, $params);
- $tsLocale = $current_locale;
- return $text;