PDA

View Full Version : Month language


prop
01-10-2006, 10:34 AM
Greets to all and thanks for this neat script.

I've set everything up in details, but one thing that bothers me is the <CURRENT_DATE_TIME>'s month (and day) language. It seems the script is getting what is reported by the server's PHP and not processing it through the language file variables. Thus when one sets in admin panel to show the date as eg. F j, Y --> January 10, 2006, it will always report in English no matter what, while I use another language everywhere else. Is there a way to make this script translate months and days by looking in the language files first? I searched around but couldn't find anything.

Regards

Connie
01-10-2006, 10:38 AM
Prop,

indeed the script is using the locale from the server
we have date-information in the language-files, but unfortunately, that is only used in the calendar-addon until now

I always whished to have that changed, but never started to change that..
so I put it on the todo-list and maybe it will be realised in the next release after PP 1.5

prop
01-10-2006, 10:56 AM
Ok, thanks. Meantime I'll give it a look and see if I can get it an addon somehow to get the months and days strings. One can always just use the number format of it, it's international :).

edit: <IMAGE_DATETIME> seems to come from index.php and <BROWSE_MONTHLY_ARCHIVE_AS_LINK_PAGED> in paged_archive.php. These two are to be modified to use language strings and seem to work independently.

Connie
01-10-2006, 12:17 PM
yes, it is not consequently done
in some Addons it is done, in the main program it's not done

prop
01-10-2006, 04:40 PM
I pulled an array n str_replace on it. It seems to be working ok on my parts. Uploaded it on dev area here at the site. If anyone wants it, let check.

The addon changes the output of <IMAGE_DATETIME>, <BROWSE_MONTHLY_ARCHIVE_AS_LINK_PAGED> and <BROWSE_MONTHLY_ARCHIVE_PAGED> by translating it's day and month (if any), to the language choosen by user in Pixelpost's options. Brings up 3 new tags for this that must replace the above-mentioned ones respectively. (<IMAGE_MONTH_DAY_TRANS>, <ARCHIVE_MONTH_DAY_TRANS>, <ARCHIVE_DDBOX_TRANS>)

http://pixelpost.org/v1/index.php?x=downloads&details=144

Regards

Connie
01-10-2006, 05:45 PM
great!