diff --git a/module/VuFind/src/VuFind/Recommend/AuthorInfo.php b/module/VuFind/src/VuFind/Recommend/AuthorInfo.php index 51672cd7e919fbb2bc67ec071b3744b8aeb77372..8ec61c76d9c0609f5ede7f0dbcdbc7e656d969fa 100644 --- a/module/VuFind/src/VuFind/Recommend/AuthorInfo.php +++ b/module/VuFind/src/VuFind/Recommend/AuthorInfo.php @@ -56,11 +56,8 @@ class AuthorInfo implements RecommendInterface */ public function __construct($settings) { - /* TODO: - $this->lang = Zend_Registry::getInstance() - ->get('Zend_Translate') - ->getAdapter()->getLocale(); - */ + $translator = Translator::getTranslator(); + $this->lang = is_object($translator) ? $translator->getLocale() : 'en'; } /** diff --git a/module/VuFind/src/VuFind/Recommend/ResultGoogleMapAjax.php b/module/VuFind/src/VuFind/Recommend/ResultGoogleMapAjax.php index dcd8032cea45b0bd052aa903862c21a2dc9c2f5d..d479d88a5bec86f23666b4d04a16f896c9eb3d49 100644 --- a/module/VuFind/src/VuFind/Recommend/ResultGoogleMapAjax.php +++ b/module/VuFind/src/VuFind/Recommend/ResultGoogleMapAjax.php @@ -26,7 +26,7 @@ * @link http://vufind.org/wiki/building_a_recommendations_module Wiki */ namespace VuFind\Recommend; -use Zend\Registry; +use VuFind\Translator\Translator, Zend\Registry; /** * AuthorInfo Recommendations Module @@ -100,12 +100,8 @@ class ResultGoogleMapAjax implements RecommendInterface */ public function userLang() { - /* TODO - return Registry::getInstance() - ->get('Zend_Translate') - ->getAdapter() - ->getLocale(); - */ + $translator = Translator::getTranslator(); + return is_object($translator) ? $translator->getLocale() : 'en'; } /**