Saturday, 26 October 2019

Date language problem when deploying to Netlify

This is my first time deploying a site in Netlify. I'm using Jigsaw in order to achieve this.

Everything is ok, besides the date language that is exported in production.

When I generate my production site locally it works fine displaying the date in Spanish:

Kenny Horna's blog: Date displaying in Spanish

I'm not uploading the same exact files to netlify but using the netlify.toml to run the same command in order to generate the same files:

# netlify.toml

[build]

command = "npm run production"
publish = "build_production"
environment = { PHP_VERSION = "7.2" }

But in production, the site is displaying the month in English:

Kenny Horna's blog: Date displaying in English

You can check it live here.

Note

To display the date I'm doing this:

@php(setlocale(LC_ALL, 'es_ES'))

<p class="text-gray-700 text-md md:mt-0">
  • 
</p>

Have you ever experienced something like this?

Thanks in advance for the help.



from Date language problem when deploying to Netlify

No comments:

Post a Comment