Placeholders in language strings
Translations in language files usually look like this:
But what if you need more flexibility, if you want to add string parts dynamically, e.g. a number, a link, or the name of the file in the above example?
Placeholders to the rescue:
In your code, you can now access the translation strings and replace your placeholders using the I18n::template()
method like this: