Search…

X3 Photo Gallery Support Forums

Search…
 
User avatar
lulu
Experienced
Topic Author
Posts: 33
Joined: 04 Dec 2010, 13:12

Date Format

17 Sep 2019, 08:54

Hi 

i'm french... 
In setup/advanced, it is possible to set DateFormat with timeago with Timeago in browsers language. Cool (y)

But i want to utilise my own format j M Y. I have put this format and it works well, but the month is in english.
Is it possible to have the format displayed in browsers langage like timeago ?


Thanks for the response,

lulu
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13993
Joined: 30 Sep 2006, 03:37

Re: Date Format

17 Sep 2019, 10:04

lulu wrote:In setup/advanced, it is possible to set DateFormat with timeago with Timeago in browsers language. Cool (y)
:thumbsup: Yes because "timeago" is a Javascript plugin, with built-in translations for most languages. Browser language detection is done via Javascript, and the loads the language pack accordingly.
lulu wrote:But i want to utilise my own format j M Y. I have put this format and it works well, but the month is in english.
Is it possible to have the format displayed in browsers langage like timeago ?
Unfortunately, this is more problematic. When you use your own format (not "timeago"), you are using PHP's internal date formatting, which is rendered on server in English. It might be possible to set a separate language on server in combination with setlocale function, but this would definitely not support "browsers language". Probably not worth investigating to be honest.

In the future, I think we will migrate to a full javascript date-display solution (not only timeago), in which case you will be able to display normal date formats in multiple languages also. For now though, only the "timeago" format supports language translations.
 
User avatar
lulu
Experienced
Topic Author
Posts: 33
Joined: 04 Dec 2010, 13:12

Re: Date Format

22 Sep 2019, 11:35

Understood, I will keep the months in English for the moment !

Big thanks


lulu