protected function buildServerBundle($langCode)
    {
        $extensions = common_ext_ExtensionsManager::singleton()->getInstalledExtensions();
        $extensions = helpers_ExtensionHelper::sortByDependencies($extensions);
        $translations = [];
        foreach ($extensions as $extension) {
            $file = $extension->getDir(). 'locales' . DIRECTORY_SEPARATOR . $langCode. DIRECTORY_SEPARATOR . 'messages.po';
            $new = l10n::getPoFile($file);
            if (is_array($new)) {
                $translations = array_merge($translations, $new);
            }
        }
        $cache = $this->getServiceLocator()->get(common_cache_Cache::SERVICE_ID);
        $cache->put($translations, self::TRANSLATION_PREFIX.$langCode);
        return $translations;
    }
protected function buildServerBundle($langCode)
    {
        $extensions = common_ext_ExtensionsManager::singleton()->getInstalledExtensions();
        $extensions = helpers_ExtensionHelper::sortByDependencies($extensions);
        $translations = [];
        foreach ($extensions as $extension) {
            $file = $extension->getDir(). 'locales' . DIRECTORY_SEPARATOR . $langCode. DIRECTORY_SEPARATOR . 'messages.po';
            $new = l10n::getPoFile($file);
            if (is_array($new)) {
                $translations = array_merge($translations, $new);
            }
        }
        $cache = $this->getServiceLocator()->get(common_cache_Cache::SERVICE_ID);
        $cache->put($translations, self::TRANSLATION_PREFIX.$langCode);
        return $translations;
    }
protected function buildServerBundle ( $ langCode ) { $ extensions = common_ext_ExtensionsManager :: singleton ( ) -> getInstalledExtensions ( ) ; $ extensions = helpers_ExtensionHelper :: sortByDependencies ( $ extensions ) ; $ translations = [ ] ; foreach ( $ extensions as $ extension ) { $ file = $ extension -> getDir ( ) . 'locales' . DIRECTORY_SEPARATOR . $ langCode . DIRECTORY_SEPARATOR . 'messages.po' ; $ new = l10n :: getPoFile ( $ file ) ; if ( is_array ( $ new ) ) { $ translations = array_merge ( $ translations , $ new ) ; } } $ cache = $ this -> getServiceLocator ( ) -> get ( common_cache_Cache :: SERVICE_ID ) ; $ cache -> put ( $ translations , self :: TRANSLATION_PREFIX . $ langCode ) ; return $ translations ; }
Rebuild the translation cache from the POs situated in each installed extension
@param string $langCode
@return array translation
Rebuild the translation cache from the POs situated in each installed extension