Skip to main content
Solved

"Current Day of the Week" in Different Languages

  • December 20, 2021
  • 1 reply
  • 226 views

Forum|alt.badge.img+3
Hi :)Hope you can help. I would like to use the feature "Current Day of the Week" is there a way I can translate it to Danish? thanks in advance

 

Best answer by alex.hong

Hi there @jeffkoenig,

Welcome to the Community! Thank you for posting your question regarding the use of multiple languages within our product.

As per our documentation regarding Date Variables in Templates, we only support English formatted variables. Unfortunately at this time this is only allowing English to be automated. I have put this in as a note for our product team to get eyes on it as well so that this valuable feature could be supported by Klaviyo some day.

However, there is a workaround for this in the meantime! You can use if / else statements to show the corresponding Danish value as desired. The source code would look like this: 

{% if current_weekday == Monday %}Mandag{% elif current_weekday == Tuesday %}Tirsdag{% elif current_weekday == Wednesday %}Onsdag{% elif current_weekday == Thursday %}Torsdag{% elif current_weekday == Friday %}Fredag{% elif current_weekday == Saturday %}Lørdag{% else %}Søndag{% endif %}

?name=inline1621988630.png

I hope this helped and have a good day!
Alex

View original
Did this topic or the replies in the thread help you find an answer to your question?

1 reply

alex.hong
Forum|alt.badge.img+58
  • Klaviyo Alum
  • 1552 replies
  • Answer
  • December 21, 2021

Hi there @jeffkoenig,

Welcome to the Community! Thank you for posting your question regarding the use of multiple languages within our product.

As per our documentation regarding Date Variables in Templates, we only support English formatted variables. Unfortunately at this time this is only allowing English to be automated. I have put this in as a note for our product team to get eyes on it as well so that this valuable feature could be supported by Klaviyo some day.

However, there is a workaround for this in the meantime! You can use if / else statements to show the corresponding Danish value as desired. The source code would look like this: 

{% if current_weekday == Monday %}Mandag{% elif current_weekday == Tuesday %}Tirsdag{% elif current_weekday == Wednesday %}Onsdag{% elif current_weekday == Thursday %}Torsdag{% elif current_weekday == Friday %}Fredag{% elif current_weekday == Saturday %}Lørdag{% else %}Søndag{% endif %}

?name=inline1621988630.png

I hope this helped and have a good day!
Alex