eZ Community » Forums » Setup & design » Date translation to Spanish

Date translation to Spanish

Date translation to Spanish

Wednesday 23 February 2011 6:24:37 pm - 5 replies

Hello guys,

I'm working with an eZpublish site with the frontend in Spanish and the backend in English. When an article outputs a date in large format is in English. Do you know how could I change it?



Wednesday 23 February 2011 6:56:27 pm

If the date is properly displayed through l10n, it should be formatted according to the active locale.

Wednesday 23 February 2011 9:13:09 pm

Hello Bertrand,

I wasn't using |l10n. I have introduced it in my code but I'm still getting the date in english.

This is the code I'm using:

{$node.object.data_map.publish_date.content.timestamp|l10n( 'date' )}

What do you mean with "active locale"? I'm working with esl, which I think is the spanish version, don't I?

Thanks happy.gif Emoticon

Wednesday 23 February 2011 9:23:53 pm

hi Alejandro. you should have a [RegionalSettings] group in your site.ini.append.php file. it will tell you which locale is the active one.

the template code you posted should output month names, weekdays or whatever in Spanish.

Thursday 24 February 2011 5:32:32 am

Well, as I understand, you want to display a date using the datetime operator an passing to it the 'large' date format.

I guess it's displaying in english because you don't have an override for the file datetime.ini for your frontend siteaccess, which would display the respectively date format in spanish. So try to make a datetime.ini override on the frontend siteaccess and add the following:

Formats[large]=<whatever date format you want>

Modified on Thursday 24 February 2011 5:34:53 am by Bayron Guevara

Thursday 24 February 2011 11:12:27 am

Hello guys,


This are the values of my [RegionalSettings] in the siteaccess esl


I think they are right, don't I?


I have created an override in settings/siteaccess/esl/datetime.ini.append.php with the same code of the original file:

<?php /* #?ini charset="utf-8"?
Formats[all]=%a, %A, %d, %D, %F, %g, %G, %h, %H, %i, %j, %l, %m, %M, %n, %O, %s, %T, %U, %w, %W, %Y, %y, %z, %Z
*/ ?>

I have cleared the caches, but it doesn't work. sad.gif Emoticon

I have also checked that share/locale/esl-ES.ini has the spanish translation of datetime.

Thank you for your help!!


You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from