Do you want to extract all strings that have the |trans filter attached?
Have a look at that answer:
How to generate translation file (.po, .xliff, .yml,...) from a Symfony2/Silex project?
They propose:
Also this Bundle has a extractor task:
سؤال
I'm using the TranslationServiceProvider from Silex (micro framework build based on symfony2 components). I now translate stuff in my view like this:
<h1>{{ 'psttoday'|trans }}</h1>
The psttoday
is a tag that I use. The translations are stored in yml files. Is there a way that I can just set {{ 'psttodo'|trans }}
and then run a script and write the tags to my database or some other file?
المحلول
Do you want to extract all strings that have the |trans filter attached?
Have a look at that answer:
How to generate translation file (.po, .xliff, .yml,...) from a Symfony2/Silex project?
They propose:
Also this Bundle has a extractor task: