src/Services/Translator.php
private function dictionaryFile($dictionary, $locale)
    {
        $file = $this->languagePath . DIRECTORY_SEPARATOR . $locale . DIRECTORY_SEPARATOR . $dictionary . '.php';
        if (file_exists($file)) {
            return $file;
        }

        if ($this->manifest === null) {
            /** @noinspection PhpIncludeInspection */
            $this->manifest = file_exists($this->pluginManifestOfLanguages) ? include $this->pluginManifestOfLanguages : [];
        }

        return isset($this->manifest[$locale][$dictionary]) ? base_path($this->manifest[$locale][$dictionary]) : null;
    }
private function dictionaryFile($dictionary, $locale)
    {
        $file = $this->languagePath . DIRECTORY_SEPARATOR . $locale . DIRECTORY_SEPARATOR . $dictionary . '.php';
        if (file_exists($file)) {
            return $file;
        }

        if ($this->manifest === null) {
            /** @noinspection PhpIncludeInspection */
            $this->manifest = file_exists($this->pluginManifestOfLanguages) ? include $this->pluginManifestOfLanguages : [];
        }

        return isset($this->manifest[$locale][$dictionary]) ? base_path($this->manifest[$locale][$dictionary]) : null;
    }
private function dictionaryFile ( $ dictionary , $ locale ) { $ file = $ this -> languagePath . DIRECTORY_SEPARATOR . $ locale . DIRECTORY_SEPARATOR . $ dictionary . '.php' ; if ( file_exists ( $ file ) ) { return $ file ; } if ( $ this -> manifest === null ) { /** @noinspection PhpIncludeInspection */ $ this -> manifest = file_exists ( $ this -> pluginManifestOfLanguages ) ? include $ this -> pluginManifestOfLanguages : [ ] ; } return isset ( $ this -> manifest [ $ locale ] [ $ dictionary ] ) ? base_path ( $ this -> manifest [ $ locale ] [ $ dictionary ] ) : null ; }
Get the full filename of the dictionary.

@param string $dictionary
@param string $locale
@return string
Get the full filename of the dictionary .