0

I made my own file with the translations of the bundle fields in my own language. It's working on my FOSUserBundle I created another one for comments bundle but not in FOSUserComment. It's on Translation folder.

Exemple code:

<button data-url="{{ url("fos_comment_remove_thread_comment", {"id": comment.thread.id, "commentId": comment.id, "value":  constant('FOS\\CommentBundle\\Model\\CommentInterface::STATE_DELETED')}) }}" class="fos_comment_comment_remove">
    {% trans from 'FOSCommentBundle' %}fos_comment_comment_delete{% endtrans %}
</button>

Can I replace {% trans from 'FOSCommentBundle' %}fos_comment_comment_delete{% endtrans %} to work with my translation file?

The translation works fine with defined languages but i copy a file translation and implement my language cause didn't exist on the bundle.

Veve
  • 6,643
  • 5
  • 39
  • 58
Pillow
  • 103
  • 2
  • 9

1 Answers1

1

I am not sure what you did there. Can you tell where do you store the files and what names you gave to the translation files?

you can also use {{ 'fos_comment_delete'|trans }}

Update your question so I can update my answer.

Herr Nentu'
  • 1,438
  • 3
  • 18
  • 49
  • I just create a file called FOSCommentBundle.ca.yml on folder CommentBundle/Resources/translations. And in my config.yml its defined with parameters: locale: ca And inside framework: translator: { fallbacks: ['%locale%'] }. – Pillow May 10 '17 at 11:27
  • I just remake the file and cleared cache again and now its working thanks. – Pillow May 10 '17 at 12:11