Zotero citation language with pandoc

I’m facing a similar issue to the post “Change language of Zotero citation”.

I want to use APA7 for a German paper, so the default “p.” should be replaced with “S.”. The previous solution works if you only use the Zotero Integration plugin with the output format set to “Formatted Citation,” but I wanted to use it in combination with the plugin “Pandoc Reference List,” with the output format set to “Pandoc.”

Doing this, it uses “p.” again and ignores my language settings. I have set Zotero to German in the export tab, and I also set the Pandoc citation style language to German.

Did I overlook something? Thanks for the help.

Have you set the citation style language locale in Pandoc Reference List’s settings?

Was that you were referring to here?

If so, did you use the right locale code, de-DE?


Btw, have you considered inserting citations using Pandoc Reference List itself? I find it more conventient since it’s faster. Insert them using the autocomplete dialogue that appears when you type @, if the feature is enabled:
image

I had the settings applied like you suggested. Sadly it doesn’t fix the problem, but your tip with autocomplete is a nice workaround for that, thank you :slight_smile:

But you have Deutsch (Deutschland) in your screenshot, not de-DE as I suggested. Have you tried the latter? (edit: Nevermind, I see now that the codes are just for the frontmatter specification option, the settings are predefined options).

It would also be helpful to try the frontmatter method mentioned in the settings.

Glad the other tip was helpful :+1:

After a little bit of testing, it appears that Pandoc Reference List doesn’t alter the locator, just presents it as-is. So you should be able to type the German variant (s.) and have it appear correctly. If you specify the German CSL locale file, then Pandoc will also recognize the German locator. Source.

How exactly do I define the the CSL file as german? I tried to copy the APA7 CSL from Zotero, linked it to obsidian and added to the style tag default-locale="de". I choose “de” since the language is named <locale xml:lang="de">. To be extra sure, I added a few new terms to it

<term name="page" form="short">S.</term>
<term name="page" form="long">Seite</term>
<term name="page-range" form="short">S.</term>
<term name="page-range" form="long">Seiten</term>

Sadly no effect. I have do admit that I’m not certain what exactly I have to do. I don’t have any experience in working with CSL files.

Don’t edit the CSL file, just specify the lang metadata in the note properties or in the command line, like so: -M lang=de-DE.

If you need to customize the CSL locale, you can download the german CSL locale file (a separate file) from here: GitHub - citation-style-language/locales: Official repository for Citation Style Language (CSL) locale files.

The files are under the “code” part of the repository.

This is the file you need: locales/locales-de-DE.xml at master · citation-style-language/locales · GitHub