Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

vinay049
vinay049
Offline

Badges

Badges
11

Accepted Solutions

Accepted Solutions
0

Likes Received

Likes Received
6

Posts

Posts
27

Discussions

Discussions
0

Questions

Questions
27

Ideas

Ideas
0

Blog Posts

Blog Posts
0
Top badges earned by vinay049
Customize the badges you want to showcase on your profile
Re: How to translate small piece of content within email template body - Adobe Campaign 03-11-2021
David's answer helped me.

Views

365

Like

1

Replies

1
Re: How to translate small piece of content within email template body - Adobe Campaign 03-11-2021
This worked. I noticed the difference and what was the issue. Thank you

Views

366

Like

1

Replies

0
Re: How to translate small piece of content within email template body - Adobe Campaign 18-10-2021
Hi David, Thank you for the reply. Isn't it possible to do this without using any external libraries? I tried to use the following code, but it didn't work out: Last day of the month is: <% function daysInMonth(today) { return new Date(today.getFullYear(), today.getMonth(), 0).getDate(); } function month_fr(today){ var monthFr:["Janvier", "Février", "Mars", "Avril", "Mai", "Juin", "Juillet", "Aout", "Septembre", "Octobre","Novembre","Décembre"]; var thisMonthFr = monthFr[today.getMonth()]; retur...

Views

418

Like

1

Replies

2
Re: Dynamic Date in Subject and email body - Adobe Campaign 18-10-2021
Hi Laurent, After using that snippet, I analyzed the delivery and it didn't have any error. But when I sent that email as proof, it didn't come out. I don''t now where I should check logs in such case. Also, similar thing happened with some other code in the past.

Views

664

Likes

0

Replies

1
Re: How to translate small piece of content within email template body - Adobe Campaign 18-10-2021
Hi Kapil, Thank you for your reply. I have seen this video and this helped me understand how to use blocks. I'm having 2 different deliveries as per language preference so there isn't use of conditional statement. But I'm trying to figure out how to use JS specific code so that I could have month's name in French in email body as well as subject. JS Code I pasted above worked in a simple HTML but it doesn't work in ACM as it doesn't support toLocale. Can you please help with that?

Views

425

Like

1

Replies

0
Re: Dynamic Date in Subject and email body - Adobe Campaign 15-10-2021
Thanks for providing the location for editing. After using that snippet, email didn't come through from ACM to inbox. Can you please let me know what might be the issue ?

Views

677

Likes

0

Replies

3
Re: Dynamic Date in Subject and email body - Adobe Campaign 15-10-2021
Thank you for revert.I used below mentioned approach but it didn't work out. Can you plz tell me why? Last day of the month is: <% function daysInMonth(today) { return new Date(today.getFullYear(), today.getMonth(), 0).getDate(); } function month_fr(today){ var options = { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' }; return today.toLocaleDateString("fr-FR", { month: 'long'}); } var today = new Date(); %> <%= daysInMonth(today) %> <%= month_fr(today) %>, <%= formatDate (toda...

Views

681

Likes

0

Replies

5
How to translate small piece of content within email template body - Adobe Campaign 14-10-2021
Hi everyone, I'm rendering dynamic content using JavaScript and it is in English for one email delivery. I want to use same JavaScript for content that should be in another language. For example, I'm displaying month name dynamically in email subject as well as email body in English. I want to display the same in French. I'm newbie with ACM. Can anyone help me how I can do that? I'm using following snippet for email subject for EN -<%= formatDate(new Date(), "%Bl") %> And following snippet for e...

Views

440

Like

1

Replies

9
Re: Dynamic Date in Subject and email body - Adobe Campaign 14-10-2021
Another implementation way - just corrected snippet for month. Found that in JS, month is 0-based so it was creating the issue.<%function daysInMonth(today) { return new Date(today.getFullYear(), today.getMonth()+1, 0).getDate();}var today = new Date();%><%= daysInMonth(today) %> <%= formatDate (today, "%Bl") %> Can you help with translation part?

Views

978

Likes

0

Replies

0
Re: Dynamic Date in Subject and email body - Adobe Campaign 14-10-2021
Hi Laurent, Also, the number of days for October is coming as "30" in place of "31" with this code. Do you know the reason ?

Views

691

Likes

0

Replies

0