Created
March 13, 2012 03:58
-
-
Save mlutfy/2026648 to your computer and use it in GitHub Desktop.
CiviCRM empty translation function for us-en
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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