Published Page date (day/month) in wrong order in French

AI-generated summary

The discussion addresses a localization issue where published page dates in French display the month and day in the wrong order and with incorrect capitalization. stephtara notes that the format should be “22 février” (day before month, lowercase) and suggests adding the year. Moin initially questions the format but agrees it is likely a translation issue, noting that German uses “22. Februar”. stephtara clarifies that in French, the day always precedes the month. Moin identifies the specific datetime_formats and month_names strings on Crowdin as the source of the problem, proposing to swap the %B (month) and %-d (day) variables and adjust capitalization rules. stephtara confirms that month names should generally be lowercase in French, except when starting a sentence.

I suspect this is a localization issue, maybe the order of the month and day is hardcoded?

It should be “22 février” in that order and without caps. I have to say the year would be nice to display too (at least in my case… I’m ready to bet that people are going to print them).

Or maybe it’s a #dev:translations issue?

2 Likes

Is there any place where you would write a date like this in French?

I think it’s a translation issue. The German date is 22. Februar. In general, the date formats are not that easy to find. I will update once I find the right text. But it may affect other places too, hence my question.

1 Like

No, if you write Février 22 in French it’s 2022. The day always comes before the month.

1 Like

I found the texts. I think there is more than one. If you search for datetime_formats in your site text (this might be helpful for testing) and on Crowdin, you should find them. They are difficult to read, but I think switching %B (full name of the month) and %-d (number of the day without a leading zero) in the cases where B is in front of d should improve things.

To change the months to lowercase, you need to change the month_names (I cannot find them in the site texts admin search, but you can see them on Crowdin). But I don’t know if this will result in unexpected lowercase month names somewhere else (Is there a case you write them with a capital letter in French?)

2 Likes

ooh thanks, will look at all that when my brain is back! No, months are lowercase except if you start a sentence with them… which would be infrequent!

1 Like