I'm developing on Symfony2 in PHP and I'd like to find all my translation keys in my different twig views to easily list them in my message file.
Basically, in my twig templates, a translated key / text looks like:
{{ "my text" | trans }} or {{ "my_key" | trans }} or {{"my_key"|trans}} or {{"my text"|trans}} I'd like to run a .sh script that could list all these keys/texts to be translated in my different template files.
On another project, I had to identify something like lang('MY_KEY') and a command that worked pretty much is the following one:
find . -type f -name '*.php' -execdir egrep -o -- "->lang\('[^']*" {} \; | sed -e "s/^.*->lang('//g" Maybe with this same base, how could I easily find my different translations in my files?
Thx a lot for your help!