I enabled the Translator service in my config.yml, cleared cache and installed assets using the command line interface.
My login page still says "security.login.submit". I am using a custom template, which is located in: app/Resources/FOSUserBundle/views/Security/login.html.twig
and contains (copied from the FOS provided template):
{{ 'security.login.submit'|trans }}
My config.yml:
framework:
translator: { fallback: "%locale%" }
default_locale: "%locale%"
parameters.yml:
parameters:
locale: en
Is this your own copy of the login.html.twig
?
If so have you included the trans_default_domain..
{% trans_default_domain 'FOSUserBundle' %}
If not the translator will be looking for translations in the default "messages" file.
My problem was that the cache was not cleared. To clear your cache:
rm -rf ./var/cache/*
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With