platformOS Community

How do I use translations in modules

zx Dec 11 2020 at 14:52

I have created a module and I want to use translations for the strings in it. I created a file in /modules/myModule/public/translations/en.yml:

en:
  message_input_placeholder: This is a test message

and then I am trying to use it in a partial like so:

{{ 'message_input_placeholder' | t }}

And it doesn't work. The question is how to use the translations in a module?

  • Yuri Jan 04 2021 at 14:15
    Thanks for sharing
Please sign in or fill up your profile to answer a question