The main purpose of this package is to extend the capabilities of Twig with a collection of tools and extensions.
This repository uses gitmoji for its commit messages.
\chsxf\Twig\Extension\Gettextprovides gettext functions for use in Twig templates\chsxf\Twig\Extension\Lazyprovides a Twig tag to temporarily skip strict variable checking\chsxf\Twig\Extension\SwitchCaseprovides a switch case tag implementation for Twig templates
In complement of the Gettext extension, this package provides a tool allowing you to easily extract localized strings from Twig templates through 3rd-party tools like poedit.
See the Gettext extension's documentation for further information.
- Twig 2+
We strongly recommend using Composer to install this package.
composer require chsxf/twig-tools
Source code is released under the terms of the GNU General Public License v2 if not specified otherwise.