date format output based on data file

Hello - is there a way to translate a date format like March 1, 2025 to a Spanish date like 1 de marzo de 2025 based on a data field. For example if equal to ‘PR’ use the Spanish date. Currently the dates are output like March 1, 2025.

Thank you

Hi ahaddad,

To achieve this, you can set the Locale for the document based on the data field. The locale is a setting that can affect date, time and currency output. This assumes the value is the proper language code (like “es-pr” or “es”). You can prob prepend your value with “es-” in the Data Mapping configuration.

Here’s how you can set the locale:

  1. Go to Edit > Locale, which opens the Locale dialog.
  2. Set “Use” to “Data Field” and select the appropriate data field from the dropdown.

In my example, I used a handlebars expression to inject the formatted date: {{dateLong date}}. The date is provided as a string in the ISO 8601 Date format.

image

Erik