prefix does not work, for 'layout locale="en" ', in 'citation' and 'bibliography'
I have been using the 'language' field to get different layout for a long time, the 'layout locale="en" ' works fine. But now one .csl shows strange behaviour.
default-locale="zh-CN" , and under 'citation' I used:
in order to get English layout for items whose 'language' field is 'en', and other items use the default locale.
But strangely, for items with 'en' in the 'language' field, the citation is:
ch(Aonejason 2005)en
which uses the prefix of the default locale, but uses the suffix of the 'en' locale.
Items not with 'en' use the default locale OK.
I checked all text, looks all fine.
Any hints about this strange behaviour? What are possible related reasons?
Appreciate any feedback. Thanks a lot!
default-locale="zh-CN" , and under 'citation' I used:
<layout locale="en" prefix="en(" suffix=")en">
<layout prefix="ch(" suffix=")ch">
in order to get English layout for items whose 'language' field is 'en', and other items use the default locale.
But strangely, for items with 'en' in the 'language' field, the citation is:
ch(Aonejason 2005)en
which uses the prefix of the default locale, but uses the suffix of the 'en' locale.
Items not with 'en' use the default locale OK.
I checked all text, looks all fine.
Any hints about this strange behaviour? What are possible related reasons?
Appreciate any feedback. Thanks a lot!
I have been using the 'language' field to get different layout for a long time, the 'layout locale="en" ' works fine.
The current CSL CAN generate different layouts by using 'language' field with different inputs.
It’s possible there is a bug in the citation processor handling of locales, but for such a core part of multilingual support, that would surprise me here.
Just for anybody interested, I tested the 'bibliography' section as well, which shows the same behaviour: 'prefix' of 'locale="en" ' does not work, still uses the default locale setting. But 'suffix' and other parts follows the 'en' settings fine.
With the following settings in 'bibliography' :
<layout prefix="en(" suffix="." locale="en">
<layout prefix="ch(" suffix="。">
The English items with 'en' in the 'language' field are e.g.:
ch(Aonejason, G. W. 2005. Fault Current Contribution From Synchronous Machine [J]. Journal of Software Engineering (345): 2256-2289.
The items without 'en' are e.g. (with Chinese punctuation marks):
ch(八二戒、悟空,2017a,大话西游[M],唐僧、玉帝译。天津: 黄河出版社。
Hope Zotero can provide inherent support for multi-language settings better in the future.