Zepi/Core/Language/src/Manager/TranslationManager.php
protected function loadLanguageFileForNamespace($namespace)
    {
        $loadedLocale = $this->request->getLocale();
        $content = $this->languageFileManager->loadTranslationFileContent($namespace, $loadedLocale);
        
        // If the received content is empty return false
        if ($content === false) {
            return false;
        }
        
        $lines = explode(PHP_EOL, $content);
        
        foreach ($lines as $line) {
            $delimiter = strpos($line, ' = ');
            if ($delimiter === false) {
                continue;
            }
            
            $pattern = substr($line, 0, $delimiter);
            $replacement = substr($line, $delimiter + 3);
            
            if (!isset($this->translatedStrings[$namespace]) || !is_array($this->translatedStrings[$namespace])) {
                $this->translatedStrings[$namespace] = array();
            }
            
            $this->translatedStrings[$namespace][$pattern] = $replacement;
        }
    }
protected function loadLanguageFileForNamespace($namespace)
    {
        $loadedLocale = $this->request->getLocale();
        $content = $this->languageFileManager->loadTranslationFileContent($namespace, $loadedLocale);
        
        // If the received content is empty return false
        if ($content === false) {
            return false;
        }
        
        $lines = explode(PHP_EOL, $content);
        
        foreach ($lines as $line) {
            $delimiter = strpos($line, ' = ');
            if ($delimiter === false) {
                continue;
            }
            
            $pattern = substr($line, 0, $delimiter);
            $replacement = substr($line, $delimiter + 3);
            
            if (!isset($this->translatedStrings[$namespace]) || !is_array($this->translatedStrings[$namespace])) {
                $this->translatedStrings[$namespace] = array();
            }
            
            $this->translatedStrings[$namespace][$pattern] = $replacement;
        }
    }
protected function loadLanguageFileForNamespace ( $ namespace ) { $ loadedLocale = $ this -> request -> getLocale ( ) ; $ content = $ this -> languageFileManager -> loadTranslationFileContent ( $ namespace , $ loadedLocale ) ; // If the received content is empty return false if ( $ content === false ) { return false ; } $ lines = explode ( PHP_EOL , $ content ) ; foreach ( $ lines as $ line ) { $ delimiter = strpos ( $ line , ' = ' ) ; if ( $ delimiter === false ) { continue ; } $ pattern = substr ( $ line , 0 , $ delimiter ) ; $ replacement = substr ( $ line , $ delimiter + 3 ) ; if ( ! isset ( $ this -> translatedStrings [ $ namespace ] ) || ! is_array ( $ this -> translatedStrings [ $ namespace ] ) ) { $ this -> translatedStrings [ $ namespace ] = array ( ) ; } $ this -> translatedStrings [ $ namespace ] [ $ pattern ] = $ replacement ; } }
Searches all language files which should be loaded for the
requested locale.

@access protected
@param string $namespace
Searches all language files which should be loaded for the requested locale .