Spanish citation style and english browsers

I'm not sure I quite understand the concept of the language attribute.

I want to create a citation style that uses the spanish attributes (es-ES), but I want it to respect this regardless of the language of the user's browser. Where do I declare it?

Also, can I modify this (es-ES) if I need to?

Right now I'm using a hack to replace what I need to:

<?xml version="1.0" encoding="UTF-8"?>
<style xmlns="http://purl.org/net/xbiblio/csl" xml:lang="en" class="in-text" >
<info>
<title>aa_test_</title>
<id>http://www.zotero.org/styles/null</id>;
<link href="http://www.zotero.org/styles/nukk"/>
<author>
<name>xx</name>
<email>ss</email>
</author>
<category term="author-date"/>
<category term="political_science"/>
<updated>2008-11-22T17:18:47+00:00</updated>
<summary>test.</summary>
<link href="http://www.url.org" rel="documentation"/>
</info>

<terms>
<locale xml:lang="en">
<term name="editor" form="short"> <single>ed.</single> <multiple>ed.</multiple> </term>
<term name="editor"> <single>ed.</single> <multiple>ed.</multiple> </term>
<term name="et-al">y otros</term>
<term name="and">y</term>
<term name="page" form="short"> <single>p.</single> <multiple>pp.</multiple> </term>
<term name="page"> <single>p.</single> <multiple>pp.</multiple> </term>
<term name="accessed">fecha de consulta</term>

</locale>
</terms>

<macro name="editor">
....
etc
  • Thanks Rintze. I had seen these. To clarify, do I simply declare the language for my style and it should (when implemented) ignore the Firefox language the user sets?

    In the second example:

    <terms>
    <locale xml:lang="en">
    <term name="and">et</term>
    </locale>
    <locale xml:lang="fr">
    <term name="et-al">et al</term>
    <term name="in">in</term>
    </locale>
    </terms>

    Is this doing the term replace according to the current language of the user?

    And finally, and unrelated: how can I escape a "<" or a ">" character? I need it in the url format for my bibliography but the csl won't validate for obvious reasons.

    Thanks!
  • Here is my problem:

    <macro name="access">
    <group delimiter=" ">
    <text value="[en línea]"/>
    <group prefix="[" suffix="]">
    <text term="accessed" suffix=": "/>
    <date variable="accessed">
    <date-part name="day" suffix=" de "/>
    <date-part name="month" text-case="lowercase" suffix=" de "/>
    <date-part name="year"/>
    </date>
    </group>
    <group prefix="<" suffix=">"> ***I GET A PARSING ERROR HERE
    <text variable="URL"/>
    </group>
    </group>
    </macro>
  • edited July 15, 2009
    To clarify, do I simply declare the language for my style and it should (when implemented) ignore the Firefox language the user sets?
    That's the idea behind default-locale, yes.
    Is this doing the term replace according to the current language of the user?
    Yes, but only for users with English or French locales. A user using the German locale will see German terms. Note that you probably have to use slightly different values for xml:lang, i.e. something out of this list: https://www.zotero.org/svn/extension/branches/1.0/chrome.manifest (e.g. "en-US" and "fr-FR")
    And finally, and unrelated: how can I escape a "<" or a ">" character?
    Check the Modern Humanities Research Association (Note without Bibliography) or Nature styles to see how it's done. Or http://www.theukwebdesigncompany.com/articles/entity-escape-characters.php
  • edited July 15, 2009
    Fixed.

    I guess I should have RTFM before. I need to use the code for the symbols:

    <group prefix="&lt;" suffix="&gt;">

    Live and learn
Sign In or Register to comment.