styles icon indicating copy to clipboard operation
styles copied to clipboard

Can I localize a macro?

Open mirenbz opened this issue 2 years ago • 4 comments

I see that the complete date in the reference list/bibliography is defined for APA in apa.csl#L440 as (2023, January 12). This is not correct for Basque, it should be: (2023(e)ko urtarrilak 12) (this is the year + suffix (e)ko, followed by the month's name, urtarrila, + suffix k, followed by day number). The correct format would be different for the "Retrieved on..." fragment, but that's for another time.

Is it possible to change how the date-bib macro is constructed, per language? And if it is, how/where?

Thanks in advance!

mirenbz avatar Jan 12 '23 15:01 mirenbz

@bwiernik question: this causes localization issues for many languages. Most of them less complex than Basque, but we've also had issue with this in German & Dutch, e.g. Could we consider a small hack where we re-purpose one of the other date formats (like numeric) for that version of the date or is that too hack-ish?

adam3smith avatar Jan 12 '23 15:01 adam3smith

I opted for creating a dedicated version for Basque https://github.com/citation-style-language/styles/pull/6370 after I saw the one for Turkish, I guess it's simpler although suboptimal... Would be happy to readapt if that's made an option!

mirenbz avatar Jan 12 '23 16:01 mirenbz

@bwiernik question: this causes localization issues for many languages. Most of them less complex than Basque, but we've also had issue with this in German & Dutch, e.g. Could we consider a small hack where we re-purpose one of the other date formats (like numeric) for that version of the date or is that too hack-ish?

Within a style, I think such a hack is appropriate.

The best solution would be to have a month-day date format so that this can just be localized automatically. That would accommodate most languages that aren't as complex as Basque. I think I added that to the draft for CSL 1.1--it would be good for us to discuss a bit about it

bwiernik avatar Jan 12 '23 16:01 bwiernik

Hi, I just found myself with the same issue for Spanish: the order of date elements is different (day + prefix de + month + suffix de + year, as in 8 de mayo de 2024. I have made these changes in a dedicated version for Spanish in #7040, but I was wondering if #107 implies there's a better (more clean) way of achieving this. Thanks!

mirenbz avatar May 08 '24 12:05 mirenbz