Adding "language" when not English
As some of my sources are not in English, I need references that are not in English to denote it in the end of every item in the bibliography. I started changing the CSL macro, but I need some help.
In the first stage, I successfully managed to add the value from the field “language”, using the following:
---
<macro name="language">
<if variable="language" match="any">
<text variable="language" prefix=" (" suffix=")" text-case="capitalize-first"/>
</if>
</macro>
---
What I’d like to do now, is to complicated this, and to make it add the value in “language” only if the value is not “English”.
I thought that it should be something like:
---
<macro name="language">
<if variable="language" value="English">
</if>
<else>
<text variable="language" prefix=" (" suffix=")" text-case="capitalize-first"/>
</else>
</macro>
---
But this doesn't work. I guess you need something other than “value=”English”” - right?
In the first stage, I successfully managed to add the value from the field “language”, using the following:
---
<macro name="language">
<if variable="language" match="any">
<text variable="language" prefix=" (" suffix=")" text-case="capitalize-first"/>
</if>
</macro>
---
What I’d like to do now, is to complicated this, and to make it add the value in “language” only if the value is not “English”.
I thought that it should be something like:
---
<macro name="language">
<if variable="language" value="English">
</if>
<else>
<text variable="language" prefix=" (" suffix=")" text-case="capitalize-first"/>
</else>
</macro>
---
But this doesn't work. I guess you need something other than “value=”English”” - right?
This is an old discussion that has not been active in a long time. Before commenting here, you should strongly consider starting a new discussion instead. If you think the content of this discussion is still relevant, you can link to it from your new discussion.
You can ignore the stuff on installing external abbreviation lists. Essentially all you need to do is: (1) set the proper language tag value in the Language field ("en" for English, "fr" for French, etc.); (2) render the "language" field in your style with form="short"; and (3) through the Classic word processor dialog and the "abbrevs." popup, select the "Places" list and enter the appropriate values for each language tag, setting "en" to "{suppress}".
The transformed entries will only appear in the word processor; you will get the literal content when generating bibliographies in Zotero itself.