private function loadTranslationsFromDefaultPath()
    {
        /** @var DirectoryInterface $baseDir */
        $baseDir = $this->getBaseDirectory();
        /** @var Filesystem $filesystem */
        $filesystem = $this->getBaseDirectory()->getFilesystem();
        if ($filesystem->has($baseDir->getFullPath() . '/translations') === false) {
            return null;
        }
        $translations = [];
        /** @var Local $local */
        $local = $filesystem->getAdapter();
        $basePath = $local->getPathPrefix();

        /** @var DirectoryInterface $translationDirectory */
        $translationDirectory = $filesystem->get($baseDir->getFullPath() . '/translations');
        foreach ($translationDirectory->getContents(true) as $fileInfo) {
            if ($fileInfo->isFile() === false) {
                continue;
            }

            $format = $fileInfo->getExtension();
            $resource = $basePath . $fileInfo->getPath();
            $locale = $fileInfo->getFilename('.' . $format);

            $translations[] = [$format, $resource, $locale];
        }

        return $translations;
    }
private function loadTranslationsFromDefaultPath()
    {
        /** @var DirectoryInterface $baseDir */
        $baseDir = $this->getBaseDirectory();
        /** @var Filesystem $filesystem */
        $filesystem = $this->getBaseDirectory()->getFilesystem();
        if ($filesystem->has($baseDir->getFullPath() . '/translations') === false) {
            return null;
        }
        $translations = [];
        /** @var Local $local */
        $local = $filesystem->getAdapter();
        $basePath = $local->getPathPrefix();

        /** @var DirectoryInterface $translationDirectory */
        $translationDirectory = $filesystem->get($baseDir->getFullPath() . '/translations');
        foreach ($translationDirectory->getContents(true) as $fileInfo) {
            if ($fileInfo->isFile() === false) {
                continue;
            }

            $format = $fileInfo->getExtension();
            $resource = $basePath . $fileInfo->getPath();
            $locale = $fileInfo->getFilename('.' . $format);

            $translations[] = [$format, $resource, $locale];
        }

        return $translations;
    }
private function loadTranslationsFromDefaultPath ( ) { /** @var DirectoryInterface $baseDir */ $ baseDir = $ this -> getBaseDirectory ( ) ; /** @var Filesystem $filesystem */ $ filesystem = $ this -> getBaseDirectory ( ) -> getFilesystem ( ) ; if ( $ filesystem -> has ( $ baseDir -> getFullPath ( ) . '/translations' ) === false ) { return null ; } $ translations = [ ] ; /** @var Local $local */ $ local = $ filesystem -> getAdapter ( ) ; $ basePath = $ local -> getPathPrefix ( ) ; /** @var DirectoryInterface $translationDirectory */ $ translationDirectory = $ filesystem -> get ( $ baseDir -> getFullPath ( ) . '/translations' ) ; foreach ( $ translationDirectory -> getContents ( true ) as $ fileInfo ) { if ( $ fileInfo -> isFile ( ) === false ) { continue ; } $ format = $ fileInfo -> getExtension ( ) ; $ resource = $ basePath . $ fileInfo -> getPath ( ) ; $ locale = $ fileInfo -> getFilename ( '.' . $ format ) ; $ translations [ ] = [ $ format , $ resource , $ locale ] ; } return $ translations ; }
Load translations from every extensions translations directory.

File names must follow common naming conventions, e.g.:
- en.yml
- en_GB.yml
Load translations from every extensions translations directory .