odan / slim4-skeleton

A Slim 4 Skeleton
https://odan.github.io/slim4-skeleton/
MIT License
446 stars 80 forks source link

Add twig-translation dependency #2

Closed killua-eu closed 5 years ago

killua-eu commented 5 years ago

Now that the twig-assets are there , would you mind adding twig-translation too? I think it would be a good addition.

odan commented 5 years ago

The package odan/twig-translation is part of this Slim 4 skeleton now. I also created a new section in the readme to explain the Slim 4 integration. For more details you could take a look into the latest master.

To parse the Twig templates you could just Poedit PRO or you compile the Twig templates to PHP and parse the PHP templates with the free version of Poedit.

Usage:

php bin/parse-twig.php
carlosnarro commented 4 years ago

You need add the sources paths "templates" on de_DE_messages.po file for update from code if you use Poedit PRO. You can open file with Poedit PRO

Catalogue > Properties... > Source paths > +

and select the tempaltes path. Accept and click in "Update from code" and your twig strings translations appear for be translated.