I18n.php 784 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. /*
  3. * This file is part of Twig.
  4. *
  5. * (c) 2010 Fabien Potencier
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. class Twig_Extensions_Extension_I18n extends Twig_Extension
  11. {
  12. /**
  13. * {@inheritdoc}
  14. */
  15. public function getTokenParsers()
  16. {
  17. return array(new Twig_Extensions_TokenParser_Trans());
  18. }
  19. /**
  20. * {@inheritdoc}
  21. */
  22. public function getFilters()
  23. {
  24. return array(
  25. new Twig_SimpleFilter('trans', 'gettext'),
  26. );
  27. }
  28. /**
  29. * {@inheritdoc}
  30. */
  31. public function getName()
  32. {
  33. return 'i18n';
  34. }
  35. }
  36. class_alias('Twig_Extensions_Extension_I18n', 'Twig\Extensions\I18nExtension', false);