i have part of code in login.html.twig page
i want translate error message "invalid credentials."
{% if error %} <div style="color:red"> {{ error.messagekey|trans(error.messagedata, 'security') }} </div> {% endif %}
now, i'm trying translat in messages.en.yml or in fosuserbundle.en.yml , nothing happen. (using symfony3)
after looking long time solution found can help
i searched message coming from.. , found message "invalid credentials." coming path.
vendor\symfony\symfony\src\symfony\component\security\core\resources\translations\security.en.xlf
so copeid file security.en.xlf app\resources\translations , made change in part wanted translate
<trans-unit id="4"> <source>invalid credentials.</source> <target>username/password doesn't match</target> </trans-unit>
Comments
Post a Comment