Help editing a csl file

Hi! I'd really appreciate some help editing a csl file. I have two issues. I downloaded the csl template for the Chicago Manual of Style and edited it to fit my language (Croatian) and the guidelines of my University. However I'm unable to check if the file works becuase (issue 1), when I try to import it into Zotero (by either double-clicking or manually adding it in the preferences > style manager), I get an error message saying it "is not a valid style file". Though it still is in csl format and I'm able to normally open it in Notepad on Windows.

Issue no. 2 is that I'm trying to get the quotation marks for chapters and journal articles to look like »this«. In an older post in the forum, I read that inserting


into the file would solve the issue. So here's the chunk of my code where this applies.


(ur. i prev.)
Uredio/la i preveo/la

Does this look ok?

I'd really appreciate some help!
Thanks in advance.
  • (You need to edit your post to add <code> and </code> around your code for it to show up.)
  • edited October 2, 2019
    You can use this tool and it will tell you what is wrong with the file:
    Otherwise, please post your code on and post the link here, so we can have a proper look.
  • Hi @damnation ! Thanks for the reply. I think it's easiest for everyone if I just post the code in hastebin like you said. you can see, I'm a complete newb at this. Here's the link to the code:
  • edited October 2, 2019
    You have two locale sections and one doesn't have a language specified.
    Combine them and use the correct language code.

    <locale xml:lang="hu">
    <term name="open-quote">»</term>
    <term name="close-quote">«</term>
    <term name="open-inner-quote">‘</term>
    <term name="close-inner-quote">’</term>
    <term name="editor" form="verb-short">(ur.)</term>
    <term name="translator" form="verb-short">(prev.)</term>
    <term name="translator" form="short">(prev.)</term>
    <term name="editortranslator" form="verb-short">(ur. i prev.)</term>
    <term name="editortranslator" form="verb">Uredio/la i preveo/la</term>
    <term name="translator" form="short">(prev.)</term>

    (and for all those terms, I would put the brackets not here in the locale section, but as pre/suffix in the various macros.)

    All the other mistakes are because you are calling terms in hungarian. You need to call them in English.
    <text term="verzija"/> will not work. needs to be text term="version". CSL is written in English.
  • Hi damnation! Thanks for the feedback and sorry for the late reply. I've been trying to tweak things in between work and all, but I'm not sure exactly how to go about it.

    Basically, here's the code again.

    I've combined the two locale sections into one as you suggested. However, I'm not sure what you're referring to when you say "all those terms"? And by brackets, are you referring to the parts of the code where I've put "(ur.)", "(prev.)", etc.? Or something else?

    Also the language is Croatian, not Hungarian. So hr should be the language code, right? I've changed all the text terms into Englsih, but won't it then generate all the text in English? E.g. it would say "edition 1" or "in:" or "translated by" instead of all of this being in Croatian. Please correct me if I'm wrong.
  • No, the `term="editor"` and similar bits are computer code, not what prints. When you specific Croation as the language in your document, Zotero will insert the Croation translations of those terms.
  • (That’s the benefit of using `term=` instead of hard-coding text in with `value=`.)
  • Hi.

    Is the style only going to be in croatian? If so, set a default-locale. (line two, default-locale="hr-CR").

    brackets: yes, that's what I meant.
Sign In or Register to comment.