init(); function getAvailableLanguages() { /* {{{ */ error_log('getAvailableLanguages() is deprecated'); return $GLOBALS['translator']->getAvailableLanguages(); } /* }}} */ function getLanguages() { /* {{{ */ return $GLOBALS['translator']->getLanguages(); } /* }}} */ /** * Get translation * * Returns the translation for a given key. It will replace markers * in the form [xxx] with those elements from the array $replace. * A default text can be gіven for the case, that there is no translation * available. The fourth parameter can override the currently set language * in the session or the default language from the configuration. * * @param string $key key of translation text * @param array $replace list of values that replace markers in the text * @param string $defaulttext text used if no translation can be found * @param string $lang use this language instead of the currently set lang */ function getMLText($key, $replace = array(), $defaulttext = null, $lang="") { /* {{{ */ trigger_error("getMLText() is deprecated.", E_USER_DEPRECATED); foreach(debug_backtrace() as $n) { trigger_error($n['file'].": Line ".$n['line'], E_USER_DEPRECATED); } return $GLOBALS['translator']->translate($key, $replace, $defaulttext, $lang); } /* }}} */ function printMLText($key, $replace = array(), $defaulttext = null, $lang="") { /* {{{ */ $GLOBALS['translator']->print($key, $replace, $defaulttext, $lang); } /* }}} */ function printReviewStatusText($status, $date=0) { /* {{{ */ $GLOBALS['translator']->printReviewStatusText($status, $date); } /* }}} */ function getReviewStatusText($status, $date=0) { /* {{{ */ return $GLOBALS['translator']->getReviewStatusText($status, $date); } /* }}} */ function printReceiptStatusText($status, $date=0) { /* {{{ */ print getReceiptStatusText($status, $date); } /* }}} */ function getReceiptStatusText($status, $date=0) { /* {{{ */ if (is_null($status)) { return getMLText("status_unknown"); } else { switch ($status) { case -2: return getMLText("status_recipient_removed"); break; case -1: return getMLText("status_receipt_rejected").($date !=0 ? " ".$date : ""); break; case 0: return getMLText("status_not_receipted"); break; case 1: return getMLText("status_receipted").($date !=0 ? " ".$date : ""); break; default: return getMLText("status_unknown"); break; } } } /* }}} */ function printRevisionStatusText($status, $date=0) { /* {{{ */ print getRevisionStatusText($status, $date); } /* }}} */ function getRevisionStatusText($status, $date=0) { /* {{{ */ if (is_null($status)) { return getMLText("status_unknown"); } else { switch ($status) { case -3: return getMLText("status_revision_sleeping"); break; case -2: return getMLText("status_revisor_removed"); break; case -1: return getMLText("status_needs_correction").($date !=0 ? " ".$date : ""); return getMLText("status_revision_rejected").($date !=0 ? " ".$date : ""); break; case 0: return getMLText("status_not_revised"); break; case 1: return getMLText("status_revised").($date !=0 ? " ".$date : ""); break; default: return getMLText("status_unknown"); break; } } } /* }}} */ function printApprovalStatusText($status, $date=0) { /* {{{ */ $GLOBALS['translator']->printApprovalStatusText($status, $date); } /* }}} */ function getApprovalStatusText($status, $date=0) { /* {{{ */ return $GLOBALS['translator']->getApprovalStatusText($status, $date); } /* }}} */ function printOverallStatusText($status) { /* {{{ */ $GLOBALS['translator']->printOverallStatusText($status); } /* }}} */ function getOverallStatusText($status) { /* {{{ */ return $GLOBALS['translator']->getOverallStatusText($status); } /* }}} */ function getAttributeTypeText($attrdef) { /* {{{ */ return $GLOBALS['translator']->getAttributeTypeText($attrdef); } /* }}} */ function getAttributeObjectTypeText($attrdef) { /* {{{ */ return $GLOBALS['translator']->getAttributeObjectTypeText($attrdef); } /* }}} */ function getAttributeValidationText($error, $attrname='', $attrvalue='', $regex='') { /* {{{ */ return $GLOBALS['translator']->getAttributeValidationText($error, $attrname, $attrvalue, $regex); } /* }}} */ function getAttributeValidationError($error, $attrname='', $attrvalue='', $regex='') { /* {{{ */ return $GLOBALS['translator']->getAttributeValidationText($error, $attrname, $attrvalue, $regex); } /* }}} */