4 * This file is part of Twig.
6 * (c) 2010 Fabien Potencier
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
11 class Twig_Extensions_Extension_I18n
extends Twig_Extension
14 * Returns the token parser instances to add to the existing list.
16 * @return array An array of Twig_TokenParserInterface or Twig_TokenParserBrokerInterface instances
18 public function getTokenParsers()
20 return array(new Twig_Extensions_TokenParser_Trans());
24 * Returns a list of filters to add to the existing list.
26 * @return array An array of filters
28 public function getFilters()
31 'trans' => new Twig_Filter_Function('gettext'),
36 * Returns the name of the extension.
38 * @return string The extension name
40 public function getName()