Page 1 of 1

Date Format

Posted: 17 Sep 2019, 08:54
by lulu
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

Re: Date Format

Posted: 17 Sep 2019, 10:04
by mjau-mjau
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.

Re: Date Format

Posted: 22 Sep 2019, 11:35
by lulu
Understood, I will keep the months in English for the moment !

Big thanks


lulu