PHPackages                             baukakz/twig-trans - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. baukakz/twig-trans

ActiveLibrary[Templating &amp; Views](/categories/templating)

baukakz/twig-trans
==================

Twig 3 translation extension

v1.1.3(1y ago)0464↑325%MITPHPPHP &gt;=7.2

Since Dec 5Pushed 1y agoCompare

[ Source](https://github.com/BaukaKZ/twig-trans)[ Packagist](https://packagist.org/packages/baukakz/twig-trans)[ RSS](/packages/baukakz-twig-trans/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (3)Versions (2)Used By (0)

Twig Trans
==========

[](#twig-trans)

[![Latest Version](https://camo.githubusercontent.com/2ed00650a9f13c63a4b694b060e94a292c7310fbcf10c10d4211efa2a7ad9086/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f4a426c6f6e642f747769672d7472616e732e7376673f7374796c653d666c61742d737175617265266c6162656c3d52656c65617365)](https://github.com/JBlond/twig-trans/releases)[![Packagist Installs](https://camo.githubusercontent.com/3f06ab755536024314500fbd480a046f34c0e9974f87de3f467a089de5241c32/68747470733a2f2f62616467656e2e6e65742f7061636b61676973742f64742f6a626c6f6e642f747769672d7472616e73)](https://packagist.org/packages/jblond/twig-trans)

Introduction
------------

[](#introduction)

This is the replacement for the old **Twig** Extensions **I18n** / **Intl** / **I18nExtension** for the translation with po / mo **gettext** files.

I didn't want to install Symfony, but Twig only. Symfony seemed to be too much overhead.

This extension enables Twig templates to use `|trans` and `{% trans %}` + `{% endtrans %}` again

Install
-------

[](#install)

```
composer require BaukaKZ/twig-trans
```

Example Use
-----------

[](#example-use)

```
