I'm a bit hesitant to ask this, but I have a drupal 8 site with 2 languages enabled - English as default and German. I have URL prefixes 'en' and 'de' to detect the chosen language. When setting German as default, the menus are translated, fields etc. It all works reasonably well. However, none of strings I use in my custom modules are translated. A very simple example
class testController extends ControllerBase {
...
drupal_set_message(t("Sorry, that does not work"));
....
}
The string is not translated when using german as the site's default language. Furthermore in my twig templates {% trans %} Hello {% endtrans %}
have absolutely no effect.
Is there something I am missing here or I have to specifically set up ? I have used google for hours but do not find any solution to this weird problem. I've also tried all kinds of language detection methods in the Drupal settings - no effect. I have modules: Configuration Translation, Content Translation, Interface Translation and Language enabled.
/admin/config/regional/translate
do you see your string?