Skip to content

Checklist for submitting a new localisation file (.lbx)

Dávid Lupták edited this page Mar 22, 2021 · 9 revisions

Checklist for submitting a new .lbx file

This checklist explains what needs to be done to add support for a new language to Biblatex. Essentially, supporting a new language requires an .lbx file for the language.

Encoding

.lbx files must be encoded in ASCII (using TeX commands for accents if required) or UTF-8. If possible, ASCII is preferable because any ASCII file is also a valid UTF-8 file, making the .lbx file more versatile.

Bibliography Strings

Use one of the .lbx files which ship with Biblatex as a template. Note that the translations in english.lbx and german.lbx are the reference translations. Other .lbx files may be incomplete. Proceed as follows:

  1. Copy the existing file and rename it. Use the babel language identifier of the language as the file name.
  2. Remove the \DeclareBibliographyExtras and \UndeclareBibliographyExtras parts (for the time being, see below for explanation).
  3. Translate the \DeclareBibliographyStrings part. Note the following:
    • When using english.lbx as a template, remove the \finalandcomma macros from the translations. This is only required to support both British and American English in one file. Other modules should either place or omit a comma, depending on the language.
    • Abbreviated strings must use \adddot or .\isdot at the end of the string because Biblatex's punctuation tracker distinguishes periods and abbreviation dots.
    • If the language uses \frenchspacing, only the final abbreviation dot must be marked as such. \adddot or \isdot is optional in the middle of the string.
    • If the language uses \nonfrenchspacing, all abbreviation dots must be marked as such.

Bibliography Extras

Adding bibliography extras requires more in-depth knowledge of Biblatex's localization modules. It is usually best if you go over the checklist below and send the answers to the Biblatex developers along with the translations; i.e., you translate the \DeclareBibliographyStrings part but omit \DeclareBibliographyExtras.

  1. What kind of dash do you use in number ranges like "35-50"?

    • \textendash? \textemdash? hyphen?
    • Are there any spaces around the dash?
  2. What kind of dash do you use in date ranges like "1st January-3rd February 2009"?

    • \textendash? \textemdash? hyphen?
    • Are there any spaces around the dash?
  3. In lists and enumerations, do you add a comma in addition to connectors like "and"? Examples:

    • UK English: "apples, oranges and cherries"
    • US English: "apples, oranges, and cherries"
  4. How do you format short ordinals? Are ordinals gender/number sensitive? Examples:

    • English: 1st 2nd 3rd 4th 5th ... [= gender insensitive, 1-3 number sensitive]
    • German: 1. 2. 3. 4. 5. ... [= gender/number insensitive]
    • Spanish: 1º 2º 3º 4º 5º ... (masc.), 1ª 2ª 3ª 4ª 5ª ... (fem.) [= gender sensitive, number insensitive]
    • French: 1er 2e 3e 4e 5e ... (masc.), 1re 2e 3e 4e 5e ... (fem.) [= only 1 is gender/number sensitive]
  5. What's the gender of the word "edition"?

  6. What's the gender of the word "series" (of a journal)?

  7. What's the long date format?

    1. What happens if the day is missing from the date?
    2. What happens if both day and month are missing?
    3. Does this day format use leading zeros?
    4. Please be specific about the spaces to be used (non-breakable, thin spaces).
    5. What happens for date ranges with compact (1.--6. February 2010, 1. February--6. March 2010) and non-compact ranges (1. February 2010--6. February 2010)?

    Examples:

    • US English: [month name] [day as number], [year] = January 1, 2009
    • UK English: [day as ordinal] [month name] [year] = 1st January 2009

    Reduced precision examples:

    • UK English: March 2010
    • UK English: 2010

    Comp date range examples:

    • US English: January 1--6, 2009; January 1--February 2, 2009
  8. What's the short date format?

    1. What happens if the day is missing from the date?
    2. What happens if both day and month are missing?
    3. Does this day format use leading zeros?
    4. Please be specific about the spaces to be used (non-breakable, thin spaces).
    5. What happens for date ranges with compact (1.--6. February 2010, 1. February--6. March 2010) and non-compact ranges (1. February 2010--6. February 2010)?

    Examples:

    • US English: month/day/year = 01/31/2009
    • UK English: day/month/year = 31/01/2009
    • German: day.month.year = 31.01.2009
    • Swedish: year-month-day = 2009-01-31
  9. After which punctuation marks do you capitalize a word? Examples:

    • after ". ! ?" (English = package default)
    • after ". : ! ?" (German)
  10. What's the 12h time format?/What's the 24h time format?

  11. What's the format for dates with seasons only, such as 'Summer 2010'?

Testing

You can test your .lbx file against 03-localization-keys.tex. That file not only contains a short explanation for each bibstring, it also prints the entire contents of biblatex-examples.bib and thus shows many strings in action.