public function getSiteLanguage()
    {
        // Event parameters prepare
        $arrayParameters = $this->makeArrayFromParameters(__METHOD__, func_get_args());

        // Sending service start event
        $arrayParameters = $this->sendEvent('melisengine_service_get_site_lang_start', $arrayParameters);

        // Service implementation start
        $siteModule = getenv('MELIS_MODULE');
        $container = new Container('melisplugins');
        $config = $this->getServiceLocator()->get('config');

        $langId = $container['melis-plugins-lang-id'];
        $langLocale = $container['melis-plugins-lang-locale'];

        if (!empty($config['site'][$siteModule]['language']['language_id'])) 
            $langId = $config['site'][$siteModule]['language']['language_id'];

        if (!empty($config['site'][$siteModule]['language']['language_locale'])) 
            $langLocale = $config['site'][$siteModule]['language']['language_locale'];

        $result = array(
            'langId' => $langId,
            'langLocale' => $langLocale,
        );
        // Service implementation end

        // Adding results to parameters for events treatment if needed
        $arrayParameters['results'] = $result;
        // Sending service end event
        $arrayParameters = $this->sendEvent('melisengine_service_get_site_lang_end', $arrayParameters);

        return $arrayParameters['results'];
    }
public function getSiteLanguage()
    {
        // Event parameters prepare
        $arrayParameters = $this->makeArrayFromParameters(__METHOD__, func_get_args());

        // Sending service start event
        $arrayParameters = $this->sendEvent('melisengine_service_get_site_lang_start', $arrayParameters);

        // Service implementation start
        $siteModule = getenv('MELIS_MODULE');
        $container = new Container('melisplugins');
        $config = $this->getServiceLocator()->get('config');

        $langId = $container['melis-plugins-lang-id'];
        $langLocale = $container['melis-plugins-lang-locale'];

        if (!empty($config['site'][$siteModule]['language']['language_id'])) 
            $langId = $config['site'][$siteModule]['language']['language_id'];

        if (!empty($config['site'][$siteModule]['language']['language_locale'])) 
            $langLocale = $config['site'][$siteModule]['language']['language_locale'];

        $result = array(
            'langId' => $langId,
            'langLocale' => $langLocale,
        );
        // Service implementation end

        // Adding results to parameters for events treatment if needed
        $arrayParameters['results'] = $result;
        // Sending service end event
        $arrayParameters = $this->sendEvent('melisengine_service_get_site_lang_end', $arrayParameters);

        return $arrayParameters['results'];
    }
public function getSiteLanguage ( ) { // Event parameters prepare $ arrayParameters = $ this -> makeArrayFromParameters ( __METHOD__ , func_get_args ( ) ) ; // Sending service start event $ arrayParameters = $ this -> sendEvent ( 'melisengine_service_get_site_lang_start' , $ arrayParameters ) ; // Service implementation start $ siteModule = getenv ( 'MELIS_MODULE' ) ; $ container = new Container ( 'melisplugins' ) ; $ config = $ this -> getServiceLocator ( ) -> get ( 'config' ) ; $ langId = $ container [ 'melis-plugins-lang-id' ] ; $ langLocale = $ container [ 'melis-plugins-lang-locale' ] ; if ( ! empty ( $ config [ 'site' ] [ $ siteModule ] [ 'language' ] [ 'language_id' ] ) ) $ langId = $ config [ 'site' ] [ $ siteModule ] [ 'language' ] [ 'language_id' ] ; if ( ! empty ( $ config [ 'site' ] [ $ siteModule ] [ 'language' ] [ 'language_locale' ] ) ) $ langLocale = $ config [ 'site' ] [ $ siteModule ] [ 'language' ] [ 'language_locale' ] ; $ result = array ( 'langId' => $ langId , 'langLocale' => $ langLocale , ) ; // Service implementation end // Adding results to parameters for events treatment if needed $ arrayParameters [ 'results' ] = $ result ; // Sending service end event $ arrayParameters = $ this -> sendEvent ( 'melisengine_service_get_site_lang_end' , $ arrayParameters ) ; return $ arrayParameters [ 'results' ] ; }
This service return the language id and its locale
use for transating text fort

@return array language
This service return the language id and its locale use for transating text fort