Issue localizing month-date

I'm having trouble trying to solve an issue I find using styles like Chicago or APA in Spanish or Catalan that also applies for other languages. Items like newspaper articles, which display the day and month separate from the year, are not well localized. In both styles, this part of the date is set as:

<date variable="issued">
<date-part name="month"/>
<date-part name="day" prefix=" "/>
</date>


While that works for English, for languages like Spanish, Portuguese or Catalan it would be:

<date variable="issued">
<date-part name="day" suffix=" de "/>
<date-part name="month"/>
</date>


And for French or Italian, the same order but without "de" as a suffix for day.

Chicago has a date-issued-month-day macro, which makes it easier to localize in the style, and I'm creating the same macro for APA, but shouldn't that be defined in the locale and called by the styles?

Anyway, with the workaround I'm trying, I've added the following locales to Chicago below the existing ones (en, en-GB), but it's now applying the first locale (ca) for this macro to all languages (including the ones defined here):

<locale xml:lang="ca">
<macro name="date-issued-month-day">
<date variable="issued">
<date-part name="day" suffix=" de "/>
<date-part name="month"/>
</date>
</macro>
</locale>
<locale xml:lang="es">
<macro name="date-issued-month-day">
<date variable="issued">
<date-part name="day" suffix=" de "/>
<date-part name="month"/>
</date>
</macro>
</locale>
<locale xml:lang="pt">
<macro name="date-issued-month-day">
<date variable="issued">
<date-part name="day" suffix=" de "/>
<date-part name="month"/>
</date>
</macro>
</locale>
<locale xml:lang="fr">
<macro name="date-issued-month-day">
<date variable="issued">
<date-part name="day" suffix=" "/>
<date-part name="month"/>
</date>
</macro>
</locale>
<locale xml:lang="it">
<macro name="date-issued-month-day">
<date variable="issued">
<date-part name="day" suffix=" "/>
<date-part name="month"/>
</date>
</macro>
</locale>


How can I solve this? It seems adding the original date-issued-month-day macro to the English locale solves the problem, but is there a less messy way to solve this? My workaround looks too chaotic to make a pull request trying to solve this issue.

Also, this issue sure affects more languages and styles I'm not familiar with and should be further considered.

Any help will be appreciated, thank you!
  • There's no reasonably way to localize this currently. month-day is planned for the schema/specs:
    https://github.com/citation-style-language/schema/issues/438#issuecomment-2103668122
  • @adamsmith So, should I make a pull request to add this workaround to those styles right now, or will it mess things up in the future? It's really inconvenient having to manually review all dates…
  • Typically for French styles, because of the " : " delimiter that is also not localisable we have two styles, one for French one for English.
  • I'm not sure about updating that currently in the Chicago & APA styles; it's pretty messy. @adunning @bwiernik , thoughts?

    In any cases, an PR on the individual styles wouldn't be the way to go: the Chicago styles (and I think APA, too, now?) are getting auto created from a template file using a script so updates are easier to promulgate across all the variants.
  • The idea of placing macros in <locale> is ingenious; unfortunately this is invalid CSL!
  • oh right, I completely missed that -- the reason we don't even try to localize this within any style is that it's entirely impossible since there's not way to call a separate month-day format; so there's nothing we can do until this is addressed in the schema.
Sign In or Register to comment.