diff --git a/restapi/index.php b/restapi/index.php index d193761c5..7c6894a8e 100644 --- a/restapi/index.php +++ b/restapi/index.php @@ -24,6 +24,7 @@ use Psr\Http\Server\RequestHandlerInterface; use Psr\Http\Server\MiddlewareInterface; use DI\ContainerBuilder; use Slim\Factory\AppFactory; +use Seeddms\Seeddms\Translator; final class JsonRenderer { /* {{{ */ public function json( @@ -3023,6 +3024,7 @@ final class SeedDMS_TestController { /* {{{ */ } public function echoData($request, $response, $args) { /* {{{ */ + $translator = $this->container->get('translator'); return $this->renderer->json($response, ['success'=>true, 'message'=>'This is the result of the echo call.', 'data'=>$args['data']]); } /* }}} */ @@ -3276,6 +3278,9 @@ $container->set('logger', $logger); $container->set('fulltextservice', $fulltextservice); $container->set('notifier', $notifier); $container->set('authenticator', $authenticator); +$translator = new Translator($settings); +$translator->init(); +$container->set('translator', $translator); $app->setBasePath($settings->_httpRoot."restapi/index.php"); diff --git a/www/index.php b/www/index.php index 23f2951da..7cc96955d 100644 --- a/www/index.php +++ b/www/index.php @@ -59,6 +59,7 @@ if (true) { $container->set('fulltextservice', $fulltextservice); $container->set('notifier', $notifier); $container->set('authenticator', $authenticator); + $container->set('translator', $translator); if (isset($GLOBALS['SEEDDMS_HOOKS']['initDMS'])) { foreach ($GLOBALS['SEEDDMS_HOOKS']['initDMS'] as $hookObj) {