Skip to content
rmzelle edited this page Oct 29, 2011 · 43 revisions

The CSL Locales repository houses the localization data for the Citation Style Language (CSL). This data, which is used to localize citations and bibliographies generated with CSL styles, and consists of localized terms, date formats and grammar rules, is stored in language-specific files. Locale files are available in two formats: the CSL 1.0 format (stored in the default branch of the repository) and the older CSL 0.8.1 format (in the "b0.8" branch).

The translation status for the CSL 1.0 locale files is:

Locale code Locale Progress
af-ZA Afrikaans (South Africa) partial
ar-AR Arabic complete
bg-BG Bulgarian partial
ca-AD Catalan not started
cs-CZ Czech complete
da-DK Danish complete
de-AT German (Austria) copied from de-DE
de-CH German (Switzerland) copied from de-DE
de-DE German complete
el-GR Greek complete
en-GB British English complete
en-US US English complete
es-ES Spanish complete
et-ET Estonian complete
fa-IR Persian complete
fr-FR French complete
he-IL Hebrew partial
hu-HU Hungarian partial
is-IS Icelandic (Iceland) complete
it-IT Italian partial
ja-JP Japanese partial
km-KH Khmer (Cambodian) partial
ko-KR Korean partial
mn-MN Mongolian not started
nb-NO Norwegian (Bokmål) complete
nl-NL Dutch complete
nn-NO Norwegian (Nynorsk) complete
pl-PL Polish complete
pt-BR Portuguese (Brazil) complete
pt-PT Portuguese (Portugal) partial
ro-RO Romanian complete
ru-RU Russian complete
sk-SK Slovak partial
sl-SI Slovenian partial
sr-RS Serbian partial
sv-SE Swedish partial
th-TH Thai not started
tr-TR Turkish partial
uk-UA Ukrainian partial
vi-VN Vietnamese partial
zh-CN Chinese (Simplified) not started
zh-TW Chinese (Traditional) partial

Translations can be contributed via the Zotero forums or by contacting me directly. If you would like to help out, please read the information below.

Translating locale files

The file names of the locale files are in the format "locales-xx-XX.xml", with "xx-XX" indicating the language tag. Locale files consist of XML, and can be edited with any text editor. If no file exists for your language of interest, you can use the US English "locales-en-US.xml" file as starting point.

Before continuing, we recommend that you take a look at the description of the XML structure of the CSL locale files described in the CSL specification.

Options

The localized option punctuation-in-quote has been set to "false" for all locales other than US English (en-US).

Dates

Dates have already been localized based on the localized date formats listed on Wikipedia. If you want to make changes, make sure to read the description of localized dates in the CSL specification. Pay attention to the use of delimiters, so that dates also display correctly if they consist of only a year and month, or of only a year.

Terms

Translating terms is relatively straightforward. Take for example the "month-01"-term:

<term name="month-01">January</term>

The name of this term is "month-01", and the text inside the term-element ("January") represents the English translation. For the Dutch CSL locale, this line is changed to:

<term name="month-01">januari</term>

Some terms are more complex. In some cases, singular and plural versions exist:

<term name="editor">
   <single>editor</single>
   <multiple>editors</multiple>
</term>

In other cases, terms exist in specific forms. E.g. the editor term occurs multiple times:

<term name="editor">
   <single>editor</single>
   <multiple>editors</multiple>
</term>
...
<term name="editor" form="short">
   <single>ed.</single>
   <multiple>eds.</multiple>
</term>
...
<term name="editor" form="verb">edited by</term>
...
<term name="editor" form="verb-short">ed.</term>

Verb forms (form="verb" or "verb-short") indicate that the term is a verb. Short forms (form="short" or "verb-short") indicate that the term is abbreviated.

The use of periods

In CSL 1.0 styles, periods can be easily removed from terms with the strip-periods attribute. Because of this, abbreviated terms in the locale files should include periods, if applicable (e.g. ```<term name="et-al">et al.</term>``` instead of ```<term name="et-al">et al</term>```).

Clone this wiki locally