I've a problem about string translations.
I've built a multi-language site and in a custom module, in a JS file, I've used the function t()
to make translatable some strings. These strings appear in /admin/config/regional/translate
and I'm able to edit their value, but then, after cleared cache when I visit the site I see the strings not translated.
The strangest things is that for other elements the system works. I'm not able to debug this, my apache error and access logs are clear, nothing also in the message log of Drupal.
Anyone can help me? Thank u in advance
*.libraries.yml
. And please verify as suggested below, if usingDrupal.t()
fixed it for you.