Wrong numerical based on text language (multilingual text)

edited January 30, 2019
The numerical which is generated by Zotero (within text) does not match with the text language in word. The numeral in MS Word 2013 is set to "Context" and also "Document Language" in "Document Preference" within Zotero ribbon is set to Persian/Arabic but yet the numerical is Arabic instead of Hindi (it is more like [1] but [۱]).
Though, I need to know how can I fix it?
I must mention it's fine by EndNote but Zotero can't get it right.
Does it have the same problem with another numerical styles?
  • @adamsmith can confirm, but I believe that, fror in-text (non-footnote) numeric styles, like IEEE, Zotero/CSL can't currently localize the numeral character used for the citation number.
  • I'm afraid that's correct, yes. Honestly, no one has asked about this before & I wouldn't be sure how we'd go about doing this.
  • @adamsmith Yes, I believe that too, but my question is: does it have a future?
    I mean a plan or something...

    Although, the is not such a thing for TeX documents, cause it's differ from WYSIWYG editors but MS Word and LibreOffice Writer has this big issue.
    Word users can use EndNote by the way (it localized well) but I do not have any idea about LibreOffice Writer users...
  • edited June 27, 2021
    @adamsmith I believe I may find the answer to this question.
    This is a Citation for hypothetical journal article
    [1] J. Smith, “Finding Waldo,” 2020.
    The field codes' for Zotero, EndNote and Mendeley in MS Word is look like this:

    Zotero:

    { ADDIN ZOTERO_ITEM CSL_CITATION {"citationID":"ksq1e8O2","properties":{"formattedCitation":"[1]","plainCitation":"[1]","noteIndex":0},"citationItems":[{"id":1091,"uris":["http://zotero.org/users/2701255/items/TSHCLNJM"],"uri":["http://zotero.org/users/2701255/items/TSHCLNJM"],"itemData":{"id":1091,"type":"article-journal","title":"Finding Waldo","author":[{"family":"Smith","given":"John"}],"issued":{"date-parts":[["2020"]]}}}],"schema":"https://github.com/citation-style-language/schema/raw/master/csl-citation.json} {"

    { ADDIN ZOTERO_BIBL {"uncited":[],"omitted":[],"custom":[]} CSL_BIBLIOGRAPHY}


    EndNote:

    { ADDIN EN.CITE <EndNote><Cite><Author>Smith</Author><Year>2020</Year><RecNum>1</RecNum><DisplayText>[1]</DisplayText><record><rec-number>1</rec-number><foreign-keys><key app="EN" db-id="xtztxfp2nxx99kee2abpp5t1dpr0wdx55wfz" timestamp="1624657996">1</key></foreign-keys><ref-type name="Journal Article">17</ref-type><contributors><authors><author>John Smith</author></authors></contributors><titles><title>Finding Waldo</title></titles><dates><year>2020</year></dates><urls></urls></record></Cite></EndNote>
    }

    { ADDIN EN.REFLIST }


    Mendeley:

    {ADDIN CSL_CITATION {"citationItems":[{"id":"ITEM-1","itemData":{"author":[{"dropping-particle":"","family":"Smith","given":"John","non-dropping-particle":"","parse-names":false,"suffix":""}],"id":"ITEM-1","issued":{"date-parts":[["2020"]]},"title":"Finding Waldo","type":"article-journal"},"uris":["http://www.mendeley.com/documents/?uuid=d88bc04a-8d30-4f81-978a-040cd28ba3f2"]}],"mendeley":{"formattedCitation":"[1]","plainTextFormattedCitation":"[1]"},"properties":{"noteIndex":0},"schema":"https://github.com/citation-style-language/schema/raw/master/csl-citation.json";}}

    {ADDIN Mendeley Bibliography CSL_BIBLIOGRAPHY }


    If one looks closely the coding style for Zotero and Mendeley are the same however EndNote uses an HTML style coding for citations. Regardless of differences between EndNote and Mendeley they both produce numerical based on context. Despite few differences between Zotero and Mendeley, Zotero cannot generate numerical based on the context of the paragraph (either Arabic or Hindi, Zotero just override the numbers with Arabic regardless of language). The only reason I can come up with is that Zotero generate the numbers on ASCII code therefore Word cannot register the proper formatting. Or maybe unicode didn't implanted properly.

    Edit: Nothing! I made the post a bit prettier! Didn't know HTML code is applicable in this forum!
  • That sounds like Hindi is being used with a dedicated font like Mangal or so and Zotero is just not respecting the font? I find it hard to believe that Mendeley, given the above field code, would actually insert the unicode ۱ character.
    So, e.g. if you copy the character inserted by Mendeley here, do you get 1 or ۱?
  • @adamsmith The exact character that Mendeley produces is "1" but in a Persian/Arabic context it shows by the later form. Also Mendeley uses Arial by default. However I don't exactly know what kind of Unicode code it uses because I set up a VM with Windows 7 without any Persian fonts and the numbers looked Arabic but in my working machine it was Persian (Additional packages was installed). This is a table that might come handy https://pit.farsi.rocks/persianword/numbers.htm.

    For your convenience I made three different Word documents with aforementioned citation managers (Zotero, EndNote and Mendeley) and uploaded them to this google drive with a screen shot of how they've been shown. Plus another document with some references created to convey if a special Unicode code is addressed to render numbers by Mendeley.

    https://drive.google.com/drive/folders/1Yvp_7u5Jb_ZO15qRbrM3lRAIrFzx1kKF?usp=sharing

    If you are uncomfortable with google drive I can email you a Zip file or upload it to GitHub.
  • FWIW, the Word docs all three show Arabic numbers for me (though I do see the Farsi script in all three), so this is somehow related to installed fonts/language packs.

    One thing I do notice is that the number actually shows as English (in the taskbar at the bottom) when inserted by Zotero, but Persian in the Mendeley doc, so that'd likely explain the difference. I'd suspect if you select the number in the Zotero doc and toggle the language to Persian, that'd switch it to ۱, but I can't test that.

    I'm wondering if taking on the language of surrounding text on inserting citations is something @adomasven could look into changing?
  • edited July 1, 2021

    @adamsmith:

    I'd suspect if you select the number in the Zotero doc and toggle the language to Persian, that'd switch it to ۱, but I can't test that.
    I did it precisely before. Not just changing the language but also changing the language from Word (Down left after page number and page positioning the dialog box) to Persian or Arabic. Or changing the font or even changing the language in "Document Preferences" to Persian within Zotero Add-on but none of them worked. It seems somehow it re-renders the numbers.
  • i think the reason that Zotero delivers inverted parenthesis in RtL Languages is the same as the one preventing it from delivering Hindi numerals instead of Arabic numerals.
    Pls note that eastern Arabic countries uses Hindi numerals not Arabic numerals.
    Hopefully Zotero team will find a solution to this problem which is not found in other managers like Mendeley.
    And i would mention that the problem of inverted parenthesis occurs only with ms word and it's Ok with LibreOffice.
  • @adamsmith Please consider making this change to your MS Word Options menu to see the exact results as I do. I believe that in your Options menu, it’s set to 'Arabic' by default. If you change it to ‘Context’, it will adjust the formatting based on the context of the paragraph.

    https://s3.amazonaws.com/zotero.org/images/forums/u2701255/aepr6re4sy303c8mwpaa.png
Sign In or Register to comment.