getLocaleFromFileName example


    private function hydrateFiles(array $files): SnippetFileCollection
    {
        $snippetFileCollection = new SnippetFileCollection();
        foreach ($files as $filePath) {
            $fileName = basename($filePath);

            $snippetFileCollection->add(new GenericSnippetFile(
                $fileName,
                $filePath,
                $this->getLocaleFromFileName($fileName),
                'Shopware',
                false,
                ''
            ));
        }

        return $snippetFileCollection;
    }

    private function getLocaleFromFileName(string $fileName): string
    {
        
Home | Imprint | This part of the site doesn't use cookies.