1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2024-12-15 17:11:18 +01:00
vichan/inc/lib/Twig/Extensions/Extension/I18n.php

46 lines
1013 B
PHP
Raw Normal View History

2011-10-11 12:49:14 +02:00
<?php
/*
* This file is part of Twig.
*
* (c) 2010 Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
class Twig_Extensions_Extension_I18n extends Twig_Extension
{
/**
* Returns the token parser instances to add to the existing list.
*
* @return array An array of Twig_TokenParserInterface or Twig_TokenParserBrokerInterface instances
*/
public function getTokenParsers()
{
return array(new Twig_Extensions_TokenParser_Trans());
}
/**
* Returns a list of filters to add to the existing list.
*
* @return array An array of filters
*/
public function getFilters()
{
return array(
2013-08-01 21:55:28 +02:00
new Twig_SimpleFilter('trans', 'gettext'),
2011-10-11 12:49:14 +02:00
);
}
/**
* Returns the name of the extension.
*
* @return string The extension name
*/
public function getName()
{
return 'i18n';
}
}