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

SOLVED

Date format change

kumarg
Level 2
Level 2

Hi,

 

Can I change the language of month? For example instead May in english, I'd like write in french (mai) or spanish (mayo). Is it possible too?

1 Accepted Solution
Manoj_Kumar_
Correct answer by
Community Advisor
Community Advisor

Hello @kumarg ,

 

You can download the moment.js from here.

Then upload this file in the Administration > Configuration > Javascript Codes. Use the Name as cus:moment.js.

Then in your workflow you can use this to get the translated output.

loadLibrary('cus:moment.js');

moment.locale('fr');
var stringMonth=moment().format('MMMM');
logInfo(stringMonth);

The Output will be French August which is août.

 

Thanks

 

 

View solution in original post

0 Replies
Manoj_Kumar_
Correct answer by
Community Advisor
Community Advisor

Hello @kumarg ,

 

You can download the moment.js from here.

Then upload this file in the Administration > Configuration > Javascript Codes. Use the Name as cus:moment.js.

Then in your workflow you can use this to get the translated output.

loadLibrary('cus:moment.js');

moment.locale('fr');
var stringMonth=moment().format('MMMM');
logInfo(stringMonth);

The Output will be French August which is août.

 

Thanks

 

 

View solution in original post