translate function for twig template parser in a slim framework  application