Skip to content

Instantly share code, notes, and snippets.

@mlutfy
Created March 13, 2012 03:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mlutfy/2026648 to your computer and use it in GitHub Desktop.
Save mlutfy/2026648 to your computer and use it in GitHub Desktop.
CiviCRM empty translation function for us-en
/**
* Implementation of hook_civicrm_config()
*/
function civicrm_l10n_civicrm_config(&$config) {
$config =& CRM_Core_Config::singleton();
$config->customTranslateFunction = 'civicrm_l10n_ts';
}
function civicrm_l10n_ts($text, $params = array()) {
static $i18n = NULL;
if (count($params)) {
foreach ($params as $key => $val) {
// replace %1 by its value
$text = str_replace('%' . $key, $val, $text);
}
}
return $text;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment