Archives December 2018

[Solution] Symfony 3 easy translation

For twig base.html.twig : <p{{ 'message'|trans }}</p> Create or update your files translation : # tempate from app/Resources php bin/console translation:update --dump-messages --force fr php bin/console translation:update --dump-messages --force en # template from AppBundle/Resources php bin/console translation:update --dump-messages --force fr AppBundle php bin/console translation:update --dump-messages --force en AppBundle  


[Solution] Add Expires headers on Ubuntu

How to add expire header on Ubuntu with Apache2 : Edit your httpd.conf The module ‘mod_expires’ must be activated Add the new configuration 1) Activate mod_expires sudo a2enmod expires sudo /etc/init.d/apache2 restart 2) Add new lines on your httpd.conf nano /etc/apache2/apache2.conf Then add these lines at the end ExpiresActive On ExpiresByType image/gif “access 1 month”

Read More