getHelperPluginManager()->getServiceLocator(); $route = $services->get('application')->getMvcEvent()->getRouteMatch()->getMatchedRouteName(); $translator = $services->get('translator'); // check for the existence of docs in the current locale $helpUrl = $this->basePath() . '/docs/'; if (file_exists(BASE_PATH . '/public/docs/' . $translator->getLocale() . '/index.html')) { $helpUrl .= $translator->getLocale() . '/'; } else if (file_exists(BASE_PATH . '/public/docs/' . $translator->getFallbackLocale() . '/index.html')) { $helpUrl .= $translator->getFallbackLocale() . '/'; } ?>