Search…

X3 Photo Gallery Support Forums

Search…
 
softcat
Topic Author
Posts: 2
Joined: 06 Feb 2019, 05:50

Date localization in popup caption

11 Feb 2019, 11:15

Hello,

I'm very impressed with the X3 phto gallery and have been customizing it for my needs for some time now.

As I'm running my gallery in german I found one tiny problem:

Is there a way to customize the formatting (and therefore the language) of  the date caption in the image popup?

Changing the Date Format in Advanced -> Date Format does not seems to affect this.

Many thanks!
Attachments
Unbenannt.PNG
Unbenannt.PNG (50.25 KiB) Viewed 2279 times
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13993
Joined: 30 Sep 2006, 03:37

Re: Date localization in popup caption

12 Feb 2019, 01:23

Some observations about the DATE that shows in the POPUP:
  • It doesn't currently support "timeago", which is a javascript implementation that makes the date relative "Two years ago ..." etc. I'm a bit hesitant to add "timeago" to the date in the popup, because it seems more practical to display the actual date here.
  • It does actually support the date format in advanced > date format, but if you have the format set to "timeago", it will revert to default "Day Month Year" (as in your screenshot).
  • You are right that the date always formats to English, because that's how the default PHP date formatting works. However, I think this can be fixed to format the date based on your server's locale with strftime(), if your server has a valid timezone setting.
I'm open to suggestions ...
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13993
Joined: 30 Sep 2006, 03:37

Re: Date localization in popup caption

14 Feb 2019, 05:25

For next release X3.28.0, we will implement moment.js, which will handle all date formatting in multiple languages.
 
softcat
Topic Author
Posts: 2
Joined: 06 Feb 2019, 05:50

Re: Date localization in popup caption

14 Feb 2019, 08:38

Hello,

I agree that the date field in the popup should not show the "timeago" formatting, the actual date seems more reasonable.

Many thanks, it that sounds wonderful implenting moment.js, I looking forward the next release.