Allow to change formatDate language at Project Settings

Hi,
Using NodeJS project, I have not testing in php projects.

Maybe, spanish speaker we are a few ones, but the same in other languages, so, would be great if at project level settings we can customize the “formatter” language.

Please allow to select the locale file that contains all the validation message and dates language:
/lib/locale/en-US.js

Right now manually in this folder “/lib/locale/” duplicate the file “en-US.js” and rename it to proper language, in my case “es-US.js”, then translate all months, monthsShort, days, daysShort and all validator message. In the file /lib/validator/index.js change too in line 100 in last part the locale.
Save it.

In Wappler version “5.4.1”. Now open “/lib/core/util.js” and replace in line 141 the last locale language “en-US” by the new one, in my case ‘es-US’ Save file.

Finally, if use docker redeploy the project.

From now we are able to use formatDate without any tricky way, no custom js to create formatDate2 and adding moment with locales framework. It work natively in the previously configured language.
And plus it works using “Server Side Binding” directly, because there is no easy way to use formatDate in another language in server side, the tricky way is all after server side while loading all js library.

Community Page
Last updated: