From ea13e4fc67345fe6ef4ae32042e6aac4a00791a0 Mon Sep 17 00:00:00 2001 From: Demian Katz <demian.katz@villanova.edu> Date: Wed, 6 Jul 2016 09:54:02 -0400 Subject: [PATCH] Proxy full translation functionality. --- module/VuFind/src/VuFind/Search/Base/Params.php | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/module/VuFind/src/VuFind/Search/Base/Params.php b/module/VuFind/src/VuFind/Search/Base/Params.php index f3e1ae91e19..60137a5365a 100644 --- a/module/VuFind/src/VuFind/Search/Base/Params.php +++ b/module/VuFind/src/VuFind/Search/Base/Params.php @@ -1687,15 +1687,20 @@ class Params implements ServiceLocatorAwareInterface } /** - * Translate a string if a translator is available. + * Translate a string (or string-castable object) * - * @param string $msg Message to translate + * @param string|object|array $target String to translate or an array of text + * domain and string to translate + * @param array $tokens Tokens to inject into the translated + * string + * @param string $default Default value to use if no translation is + * found (null for no default). * * @return string */ - public function translate($msg) + public function translate($target, $tokens = [], $default = null) { - return $this->getOptions()->translate($msg); + return $this->getOptions()->translate($target, $tokens, $default); } /** -- GitLab