Skip to content

Instantly share code, notes, and snippets.

@ursbraem
Last active November 4, 2015 20:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ursbraem/b7817ab0a720626b03db to your computer and use it in GitHub Desktop.
Save ursbraem/b7817ab0a720626b03db to your computer and use it in GitHub Desktop.
{namespace n=Tx_News_ViewHelpers}
{namespace stubr=STUBR\Customvhs\ViewHelpers}
<time class="event-date" datetime="<n:format.date format="{f:translate(key:'dateTimeFormatMachine')}">{newsItem.datetime}</n:format.date>">
<f:if condition="{settings.forcelocale}==true">
<stubr:switchlocale new="de_CH.UTF-8" />
</f:if>
<n:format.date format="{f:translate(key:'dateTimeFormatHumanWeekday')}">{newsItem.datetime}</n:format.date>
<f:if condition="{settings.forcelocale}==true">
<stubr:switchlocale new="fr_CH.UTF-8" />
</f:if>
</time>
<p class="sidebar-content">
<n:link newsItem="{newsItem}" settings="{settings}" title="{newsItem.txNewscustomLinktitle}" >{newsItem.title}</n:link>
</p>
@ursbraem
Copy link
Author

ursbraem commented Nov 4, 2015

Catches a TS setting and forces another locale quickly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment