Localized quotes

Hello!

I have a problem with localized quotes in Zotero. Many bibliographic styles enquote titles. But when I insert a citation into OpenOffice.org, I get a quoted title like this:

“Some Title”

Since my locale is de_DE, I'd expect something like:

„Some Title“

(unicode: U+201E and U+201C)

Is there a way to change this?
«13
  • Quotation marks aren't currently localized, but they probably should be. (This also came up regarding French-style quotes.)

    In the meantime, if you're comfortable editing XML, you could edit your desired style using csledit.xul (search the forums for more info), hard-code the German-style quotes using prefix and suffix attributes in place of quotes="true", and save it with a new id and name. See the Harvard 7 (de) style for an example of where this temporary workaround is used.
  • Ah, ok. Yes, I definitely think that quotation marks should be localized. In my eyes, that's one of the huge advantages of a semantic attribute like quotes="true" instead of generic ones like prefix and suffix.

    To take this further, one might think about not just taking the user locale into account, but the language of the entry itself. So an English article could use English quotes, even if the user has a German locale. (Same applies to the localization of other keywords.) This is the approach taken for example by the biblatex package for LaTeX bibliographies.

    Just one technical question: Where are the installed CSL files stored? I couldn't find them in the profile directory. Or should one always use csledit.xul to modify the styles?
  • Um, the whole reason why we (including Simon) added the quotes attribute is precisely to localize them. I hope we can fix this soon, as it would be bad to see people creating locale-specific forked styles just to get around this.

    Dan, can you give some kind of ETA on when this could be fixed? Am not sure how much work it is.
    To take this further, one might think about not just taking the user locale into account, but the language of the entry itself. So an English article could use English quotes, even if the user has a German locale.
    Whoa ... my first response is absolutely not; the source language is irrelevant to how quotes should be rendered. That's true of everything: quotes, title capitalization, etc.

    Can you point me to a real world style that suggests my understanding is wrong?
  • I know that the »Duden«, the de facto authoritative guide on correct German, recommends using quotations marks in the language of the quoted text. And in the LaTeX world, there are several popular packages supporting this, e.g. csquotes for quotations and babelbib and biblatex for bibliographies. So in my understanding, in a German document, a quoted English title should be quoted with English quotation marks just as every other English quotation.

    But this is really a special case, getting localized quotations marks into Zotero at all would be the important step in my eyes.
  • But this is really a special case, getting localized quotations marks into Zotero at all would be the important step in my eyes.
    OK, good; we agree ;-)
  • Ticket for localized quotes created.
    To take this further, one might think about not just taking the user locale into account, but the language of the entry itself. So an English article could use English quotes, even if the user has a German locale.
    For what it's worth, this was mentioned as desirable for French styles as well. When I suggested it would be difficult, bougau responded, "it's an ideal, but not essential. Because it's complex to do it automatically, these rule is less and less use."
  • According to the ticket, this should be closed. But I just tried it out with Zotero 2.1.1 and the style “tah Sozialwissenschaften”, and I still got English quotes in a German environment.

    Can somebody confirm this? If it still is an issue (or again?), I think the bug report should be re-opened.
  • It's fixed in the processor, and German quotes have been filed in the de-DE CSL locale. When those changes make it through to the next release, you should see the desired effect.
  • Into the bargin, Zotero 2.1.2 will add localized quotation mark support for Spanish, French, Bulgarian, Czech, Danish, Ukranian, Korean, Polish, Icelandic, Japanese, Arabic, Portuguese (Portugal and Brazil), Catalan, Serbian, Turkish, Chinese (Traditional), Mongolian, Hungarian, Italian, Slovene, Swedish, Romanian, Afrikaans, and Vietnamese.
  • After having upgraded to Zotero 2.1, I compared my previous bibliography with the new one.

    Unfortunately the way quotation marks have been adapted is not completely correct.

    Example :
    I type this title :
    Anton Tchékov et "La Cerisaie"

    With Zotero 2.0.9, I obtained :
    « Anton Tchékov et "La Cerisaie" » [correct]

    With Zotero 2.1, I get :
    « Anton Tchékov et « La Cerisaie » » [false]

    This concerns types for which we have to insert the title between french quotation marks.

    The rule is to have external french quotation marks, and simple quotation marks inside. The result is completely unacceptable especially when the two quotation marks follow each other.

    The problem is most important for the title, but it might occur in other fields where we have to enter both forms.

    In fact, the source of the problem is that Zotero panels (for the data base or inserting citatons) don't allow the user to type the caracters he needs. For those who have to handle sources in different languages, that is quite annoying.

    We meet a similar problem with punctuaton marks, for those which require a unbreakable space before them (: ; ? !). In Zotero panels, we just can type an ordinary space, but that sometimes leads to have : or ; or ? or ! at the beginning of a line, which is not accepted.

    The problem is that I don't see how I can correct it in the style.

    I noticed other errors, but I have to check my style first to understand their origin
  • Please upload a copy of your style as a public gist to http://gist.github.com/, and post the URL back here. I suspect what the problem with the quote marks is, but I'd like to check first to avoid causing confusion.
  • edited April 4, 2011
    Unfortunately the way quotation marks have been adapted is not completely correct.
    My mistake. I'll look into that.

    EDIT: No, locales-fr-FR.xml is right. I think your csl code is wrong.
    Instead of that:
    <text variable="title" prefix="«&#xA0;" suffix="&#xA0;»"/
    Make sure you've added the new "quotes" attribute:
    <text variable="title" quotes="true"/>
  • @Gracile,@l2lafitte,

    The quotes should flip-flop from double to single. The fact that they're not makes me suspect that they have been applied as literal affixes, rather than using the CSL quotes="true" attribute. If so, it's just a small misunderstanding about the way the capabilities of the new CSL.
  • @frank: Indeed. I thought I'd made a mistake since new quotes attribute was a bit hard to understand for me ( http://forums.zotero.org/discussion/15085/1/french-localization-csl-10/ ).
  • Here is the public gist URL :
    git://gist.github.com/901396.git
  • Par exemple, ligne 157: <text variable="title" text-case="capitalize-first" prefix="« " suffix=" »"/>
    Remplacez par: <text variable="title" text-case="capitalize-first" quotes="true"/>
  • (idem: l. 177, 187, 516)
  • About that:
    We meet a similar problem with punctuaton marks, for those which require a unbreakable space before them (: ; ? !). In Zotero panels, we just can type an ordinary space, but that sometimes leads to have : or ; or ? or ! at the beginning of a line, which is not accepted.
    I'm adding non-breaking space manually (ALT+0160 on MSWindows) but many items are automatically imported through translators and I can't review them easily.
    An automatic non-breaking space (trough localization) would be very, very great, as l2laffitte said.
  • Yes, that's the problem. You need to set the quotes with quotes="true" instead of putting the literal characters into affixes to the title. If you use quotes="true", you'll find that it works exactly as you require -- the quotes were supplied by Gracile.

    The quotes attribute should be described here:

    http://citationstyles.org/downloads/specification.html
  • @Gracile @fbennett

    Thank you very much. The quotation marks are now correct.

    I also appreciate the transformation of the apostrophe, which now becomes always ’.
    In Zotero 2.0.9, according to the way we enter the information (typing in Zotero or copying from Word), we get either ' or ’, with different behaviour in sorting of items.
  • I also appreciate the transformation of the apostrophe, which now becomes always ’.
    In Zotero 2.0.9, according to the way we enter the information (typing in Zotero or copying from Word), we get either ' or ’, with different behaviour in sorting of items.
    Yes. That's great. That solves the issue you mentioned here and is much more aesthetic too!
  • Great! Glad to hear it's working for you. Thanks for reporting.
  • edited April 4, 2011
    Yes. Coming soon in the other thread.

    Er .. in this thread. Are there never exceptions in citations with a French locale -- all styles throughout France are consistent in this, even when citing works from the English or Russian language domains, say? if it's totally strict, this should be easy to automate. If it's not quite that strict, we might have to think about how to handle the exceptions before settling on a solution.
  • edited July 25, 2013
    In a French bibliography, there must be a non-breaking space before a semicolon ";" or a colon ":" or an exclamation mark "!" or a question mark "?".
    That might be different if you cite works from other languages. But AFAIK, in these languages there is no space at all (English, German).
    If I'm right, I think we can say that if a field in zotero has been completed with a blank space followed by one of these punctuation marks, the CSL processor should replace the blank space by a non-breaking space if the style is localized (fr-FR).

    [On the long-run, it could be useful to be able to test the content of the "language" field... but that's not possible and would need a standardization of this field]

    Edit: see also this message below.
  • In a French bibliography, there must be a non-breaking space before a semicolon ";" or a colon ":" or an exclamation mark "!" or a question mark "?".
    Does it apply to citations and footnote references also?
  • But AFAIK, in these languages there is no space at all (English, German).
    Yes, as far as I know. And indeed, I certainly wouldn't want the space to be a breaking space if I inserted one in an English style / title. It would be pretty nasty looking with a line break before the quotation mark.
  • Does it apply to citations and footnote references also?
    Yes. It's a general orthographic rule.
  • If it's that strict within the French language doman, I think we can just do a find-and-replace on the rendered string output, the overhead of which would be very low, and would not affect other languages. That might produce duplicate spaces in some rare cases, but it should be possible to fix up any infelicities by adjusting the styles.

    Anyway, we can give it a try and see how it goes. I'll put this into the next processor release, probably out tomorrow or the next day.
  • edited April 4, 2011
    I think we can just do a find-and-replace on the rendered string output
    Great. Just to be sure that there are no misunderstandings: what has to be searched for?
    I mean: Find: "space:" and replace by: "nbsp:"
    Or: find ":" and replace by: "nbsp:"

    I'd prefer the first solution: it relies on user intention to distinguish between french and others languages when adding new items to zotero.
Sign In or Register to comment.