"page-range-delimiter" errors for multiple languages

When I try to use 2 different symbols as "page-range-delimiter" for 2 languages, I use:


<style xmlns="http://purl.org/net/xbiblio/csl" version="1.0" class="note" demote-non-dropping-particle="never" name-delimiter=", " names-delimiter=". " delimiter-precedes-last="never" sort-separator=", " default-locale="zh-CN" >
...
<locale >
<terms>
<term name="page-range-delimiter">AA</term>
</terms>
</locale>
<locale xml:lang="en">
<terms>
<term name="page-range-delimiter">BB</term>
</terms>
</locale>
...
<macro name="page">
<group>
<label variable="page" form="short" suffix=""/>
<text variable="page" />
</group>
</macro>
...


For items with en in the Language field, which should be controlled by <term name="page-range-delimiter">BB</term> defined under xml:lang="en" :

When the "Pages" field is in the compressed form, e.g. 1156-89, the output is correct as 1156BB89.

But when the "Pages" field is in full range, e.g. 1123-1155, the output is wrong as 1123AA1155.

After page-range-format="expanded" is added into the top <style ... >

For the same items:

When the "Pages" field is in the compressed form, e.g. 1156-89, the output is wrong as 1156AA1189, expanded but the "page-range-delimiter" is wrong.

When the "Pages" field is in full range, e.g. 1123-1155, the output is wrong as 1123AA1155.

Did I miss something to set different "page-range-delimiter" for 2 locales?

Thanks a lot for any hints!

  • Unless you're using non-standard (and currently non-valid) CSL code, the locale is determined by the style; the language field's only impact on the style is the behavior of text-case="title"
  • Thanks Adam,

    Do you mean using xml:lang="en" to support 2 locales is non-standard (and currently non-valid) CSL code?

    If this not valid way, could you please show the valid CSL to support 2 locales?

    Many thanks.
  • no, supporting multiple locales in a style is valid as you do abvoe, but for any given bibliography/document, only one locale is relevant. The locales used have nothing to do with the language field in Zotero -- they're set in the Word add-on (or when using "Create Bibliography...")
  • Thanks Adam,

    The language field in Zotero can be used to get different punctuation marks in the bibliography.

    E.g. with the following code:


    <bibliography >
    <layout suffix="." locale="en">
    <text macro="englishbib"/>
    </layout>
    <layout suffix="。">
    <text macro="chinesebib"/>
    </layout>
    </bibliography>


    if "en" is in the Language field, it can output the macro="englishbib".

    If the Language field is blank or others, it can output the macro="chinesebib" , which uses different punctuation marks.

    But "page-range-delimiter" cannot work properly to output different punctuation marks.
  • Right, but that code isn't valid CSL. It's csl-m and only kind of works in Zotero and isn't something well be able to troubleshoot here
  • Thanks Adam,

    I understand the limitation of CSL and Zotero.

    I appreciate Zotero can support different layout of 2 locales to a certain level, with non-valid CSL.

    To support 2 different layouts is a basic requirement for bibliography tools.

    The "page-range-delimiter" error may not be able to be solved in the near future, but it is something for Zotero/CSL development?
Sign In or Register to comment.