Consistent Date Format - Site and Administrator

General questions regarding the use of languages in Joomla! 3.x.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Locked
User avatar
LukeDouglas
Joomla! Explorer
Joomla! Explorer
Posts: 260
Joined: Sat Dec 08, 2007 8:23 pm
Contact:

Consistent Date Format - Site and Administrator

Post by LukeDouglas » Wed Jan 09, 2019 7:35 pm

I have a date preference of MONTH DAY, YEAR or MONTH DATE, YEAR HOUR:MINUTE that I want to use on all of my clients websites as they are U.S. based. It appears that there is NO single place I can change this PHP date layout.

I did some checking via the search field in Language / Overrides and found these settings:

Site:

DATE_FORMAT_LC
l, d F Y
DATE_FORMAT_LC1
l, d F Y
DATE_FORMAT_LC2
l, d F Y H:i
DATE_FORMAT_LC3
d F Y

Administrator:

DATE_FORMAT_LC
l, d F Y
DATE_FORMAT_LC1
l, d F Y
DATE_FORMAT_LC2
l, d F Y H:i
DATE_FORMAT_LC3
d F Y
DATE_FORMAT_LC4
Y-m-d
DATE_FORMAT_LC5
Y-m-d H:i
DATE_FORMAT_LC6
Y-m-d H:i:s

Do I have to add a new language override for English (en-GB) using either "F j, Y" or "m-d-Y" for each of these settings and for each of my clients websites (70 in all)? OR is there an single place or easier way to accomplish this need?

sozzled
I've been banned!
Posts: 13639
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia

Re: Consistent Date Format - Site and Administrator

Post by sozzled » Wed Jan 09, 2019 8:38 pm

Try using the US Language pack for J! 3.x: https://community.joomla.org/translatio ... ation.html

User avatar
LukeDouglas
Joomla! Explorer
Joomla! Explorer
Posts: 260
Joined: Sat Dec 08, 2007 8:23 pm
Contact:

Re: Consistent Date Format - Site and Administrator

Post by LukeDouglas » Wed Jan 09, 2019 9:35 pm

Sozzled,

Is this the same US language pack I already have or is it one that has these date formats M-D-Y HH:SS already modified?

sozzled
I've been banned!
Posts: 13639
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia

Re: Consistent Date Format - Site and Administrator

Post by sozzled » Thu Jan 10, 2019 2:21 am

LukeDouglas wrote:
Wed Jan 09, 2019 9:35 pm
Is this the same US language pack I already have or is it one that has these date formats M-D-Y HH:SS already modified?
I haven't a clue what you may have. I don't use this language pack myself; I'm an Australian. These US date formats are only used in four countries in the world, you know.

User avatar
imanickam
Joomla! Master
Joomla! Master
Posts: 28202
Joined: Wed Aug 13, 2008 2:57 am
Location: Chennai, India

Re: Consistent Date Format - Site and Administrator

Post by imanickam » Thu Jan 10, 2019 9:16 am

LukeDouglas wrote:
Wed Jan 09, 2019 7:35 pm
It appears that there is NO single place I can change this PHP date layout.
True. Be informed that the date format customization is done within the CMS (ie Joomla).

Be aware that the language overrides are stored in appropriate language override files. For the language English-US (en-US), the override file is named as en-US.override.ini

For the administration, the override files are located in the directory \administrator\language\overrides and for the site the override files are located in the directory \language\overrides.

What I would suggest is to create language overrides in a development environment and test them out. Once you are happy, copy the override files of administration and site to the appropriate locations in different sites. This would be a one time exercise.

Food for thought:
Other date format related language strings are

Code: Select all

DATE_FORMAT_JS1="y-m-d"
DATE_FORMAT_CALENDAR_DATE="%d-%m-%Y"
DATE_FORMAT_CALENDAR_DATETIME="%d-%m-%Y %H:%M:%S"
DATE_FORMAT_FILTER_DATE="d-[URL banned]"
DATE_FORMAT_FILTER_DATETIME="d-[URL banned] H:i:s"
You may look into these language strings as well.

Note:
You could suggest these changes to the English-US language pack coordinator. As Joomla! 3.9.2 is expected to be released in about a week or so, in case if the coordinator could make these changes in the language pack, all that would be required is to update the language pack.
Ilagnayeru (MIG) Manickam | இளஞாயிறு மாணிக்கம்
Joomla! - Global Moderators Team | Joomla! Core - Tamil (தமிழ்) Translation Team Coordinator
Former Joomla! Translations Coordination Team Lead
Eegan - Support the poor and underprivileged

User avatar
LukeDouglas
Joomla! Explorer
Joomla! Explorer
Posts: 260
Joined: Sat Dec 08, 2007 8:23 pm
Contact:

Re: Consistent Date Format - Site and Administrator

Post by LukeDouglas » Thu Jan 10, 2019 4:15 pm

I created language overrides and now the dates display as the client requested.

I do feel that a single full-date (month day year hour minute second) display setting for 'global' use throughout the website, both site and administrator, should be a dropdown option in the global settings. Language overrides could still take precedence. By doing this, it would reduce the need for a lot of language overrides. Just a thought.

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 30923
Joined: Mon Oct 27, 2008 9:27 pm
Location: Romerike, Norway

Re: Consistent Date Format - Site and Administrator

Post by Per Yngve Berg » Thu Jan 10, 2019 5:17 pm

en-GB, the default in Joomla is British English. You have to switch to en-US to get the dates correct.

User avatar
LukeDouglas
Joomla! Explorer
Joomla! Explorer
Posts: 260
Joined: Sat Dec 08, 2007 8:23 pm
Contact:

Re: Consistent Date Format - Site and Administrator

Post by LukeDouglas » Thu Jan 10, 2019 5:36 pm

Per Yngve Berg wrote:
Thu Jan 10, 2019 5:17 pm
en-GB, the default in Joomla is British English. You have to switch to en-US to get the dates correct.
Per Yngve Berg, thanks. It never ceases to amaze me that you can still learn something about Joomla even though you have developed websites using it since the break from Mambo back in 2005. I never made the 'connection' between "en-GB' and 'en-US' in the Joomla settings as it comes defaulted in the 'en-GB' language because as I simply 'overlooked' the 'en-US' language setting when installing Joomla which I have done for over 150 websites in the past 14 years. Now I know everyone is probably rolling their eyes at this admission and there is really no excuse. I guess I do need to get my eyesight checked. :)

In thinking about this, I can understand why 'en-GB' is the default setting during the installation procedure as I did some research and it appears that Joomla is used in more countries using 'en-GB'. The US is way down the list. It's an American thing where we 'believe' we should come first. LOL

In my research, I was really surprised that Joomla hit it's peak use worldwide in 2009 and has declined continuously since then. The trend is the same for Drupal. But, although Joomla and Drupal are superior CMS applications, WordPress has continued to increase in usages. I believe this is due to the 'ease of use' of WordPress that almost anyone can install and manage it while Joomla and Drupal requires a bit more technical skills.

But I ain't changing....

sozzled
I've been banned!
Posts: 13639
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia

Re: Consistent Date Format - Site and Administrator

Post by sozzled » Thu Jan 10, 2019 6:57 pm

LukeDouglas wrote:
Thu Jan 10, 2019 5:36 pm
In my research, I was really surprised that Joomla hit it's peak use worldwide in 2009 and has declined continuously since then.
Although off-topic here (and more appropriately discussed in The Lounge perhaps), I would be interested to see your research on the subject. Perhaps this is what you are referring to? >>> https://trends.google.com.au/trends/exp ... U&q=Joomla

Let's not discuss it here, though. 8)



Locked

Return to “Language - Joomla! 3.x”