Passing variable to language helper

Hey there,
quick question for you php wizzards - as the title says, I want to pass a string variable to the language helper function, like this:

<?php foreach($some-pages as $item) : ?>

// some code

    $slug = $item->slug() . '-string';
    $trans = l($slug);

  <span><?= $trans ?></span>

<?php endforeach ?>

now in the language files I would define those items like this:

  'some-page-slug-string' => 'Some string'


I seem to be missing something, what exactly is your question or the problem? :thinking:

Ah well, <span><?= $trans ?></span> doesn’t do anything, I just forgot to point that out, didn’t I :slight_smile:

If it doesn’t output anything, I guess the translation does not exist maybe because of a typo?

my browser cache prevented me from seeing the changes, nevermind.
argh, human.exe is broken again!