I'm currently trying to set theme translations in order to replace some hard coded strings by variable values.
I'm following step by step the documentation (which theoretically seems very simple). I've created a file named languages.yaml at the root of the theme which contains this test value:
en:
THEME_THEMENAME:
FEED: "Subscribe RSS"
fr:
THEME_THEMENAME:
FEED: "Abonnement RSS"
Next, I'm trying to display this value in an element inserted in the base.html.twig file this way:
<p>Translation must come here: {{ 'THEME_THEMENAME.FEED' | tu }}</p>
But only the hard coded text Translation must come here: appears...
I tried to use double or single quotes, to clear the cache, to set a languages directory with one file per language: nothing helps. The value is not displayed.
I suppose I have missed a part of the process. Thanks to everyone who would tell me what I forgot to do...