Skip to content

Instantly share code, notes, and snippets.

@sebby
Last active April 19, 2022 06:00
Show Gist options
  • Select an option

  • Save sebby/9e6a633e12db617f96a8bbbc0a9bb927 to your computer and use it in GitHub Desktop.

Select an option

Save sebby/9e6a633e12db617f96a8bbbc0a9bb927 to your computer and use it in GitHub Desktop.
Comment utiliser le filtre trans de Twig avec des placeholders. #twig #drupal
{#
@link https://www.drupal.org/node/2047135
This syntax is extremely complex to scan. This also requires the front-end developer to know about the @ ! % "Drupalism" prefix of placeholders and what each of them do.
#}
<p class="submitted">{{ "Submitted by !author on @date"|t({ '!author': author, '@date': date }) }}</p>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment