What is the most appropriate way to configure biblatex for use with an unsupported language?

First of all, you might want to have a look at Checklist for submitting a new .lbx file on the GitHub Wiki for biblatex and a real-world example of the process; the relevant part of the biblatex documentation is §4.9 Localization Modules, pp. 215-225.

The process of adding support for a language supported by babel to biblatex is pretty much straight-forward.

One just needs to create an .lbx file (named <language>.lbx where <language> is babel's language identifier, so in our case that's welsh.lbx), place it somewhere it can be found and put the translations of the bibstrings there.

There are two sections/parts in an .lbx file (1) BibliographyExtras and (2) BibliographyStrings.

The BibliographyExtras control things like date format, Oxford comma, name delimiters, use of dashes (--- vs -- etc. pp.), while BibliographyStrings are for the translations proper.

My stub for welsh.lbx looks like this (it inherits the extras from the british style; the translations are just what I picked up in a quick internet research - I doubt they are correct)

\ProvidesFile{welsh.lbx}[2014/09/15 Welsh language stub]

\InheritBibliographyExtras{british}

\DeclareBibliographyStrings{%
  bibliography     = {{Llyfryddiaeth}{Llyfryddiaeth}},
  references       = {{Cyfeiriadau}{Cyfeiriadau}},
  byeditor         = {{golygydd}{gol\adddot}},
  in               = {{yn}{yn}},
  page             = {{tudalen}{t\adddot}},
  pages            = {{tudalennau}{tt\adddot}},
}

\endinput

The easiest way to make create a new .lbx file is probably by taking one in a language you know (so english.lbx might be a good start - note that the wiki linked to above picks out english.lbx and german.lbx as 'reference files') and just start translating (taking into account the explanations and additions in §4.9.2 Localization Keys, pp. 206-217). You can check the output of your .lbx with the file biblatex/doc/examples/03-localization-keys.tex. Just put your .lbx into the same directory as 03-localization-keys.tex, load your language in babel and compile 03-localization-keys.tex. This file contains all of biblatex's default bibstrings and shows the long and short for as well as the English explanation of all strings, missing strings will generate warnings.

Some languages have features that need extra support by biblatex. In Welsh, I seem to have gathered, 'and' is either 'a' or 'ac' depending the following word (more or less like the English 'a'/'an' thing) - to handle this properly, there would need to be a command similar to spanish.lbx's \smartand (see §3.11.2 Language-specific Notes: Spanish, p. 104) - you'll notice that I backed off from dealing with that, hence the bold 'and' in the example below. For issues such as this, it is best to get in touch with the developers. While we're at it, if you plan to make an .lbx file and intend to make a comprehensive one, you might want to think about contributing to the project by submitting the file to the maintainers. Get in touch at https://github.com/plk/biblatex/issues or submit a pull request directly at https://github.com/plk/biblatex/pulls.

Self-contained MWE

\documentclass[a4paper,welsh]{article}
\usepackage{babel}
\usepackage[utf8]{inputenc}% welsh needs utf8x but biblatex doesn't like it
\usepackage[T1]{fontenc}% not great for Welsh but the best pdfTeX can do
\usepackage{csquotes}% doesn't like Welsh though biblatex likes csquotes on account of babel...
\usepackage[backend=biber]{biblatex}
\addbibresource{biblatex-examples.bib}

\title{Fy Nogfen}
\author{Rhywun}

\DeclareQuoteAlias[british]{english}{welsh}

\begin{filecontents*}{welsh.lbx}
\ProvidesFile{welsh.lbx}[2014/09/15 Welsh language stub]

\InheritBibliographyExtras{british}

\DeclareBibliographyStrings{%
  bibliography     = {{Llyfryddiaeth}{Llyfryddiaeth}},
  references       = {{Cyfeiriadau}{Cyfeiriadau}},
  byeditor         = {{golygydd}{gol\adddotspace}},
  in               = {{yn}{yn}},
  page             = {{tudalen}{t\adddot}},
  pages            = {{tudalennau}{tt\adddot}},
}

\endinput

\end{filecontents*}

\begin{document}
  \maketitle
  \tableofcontents
  \section{Cyntaf}
  \autocite{westfahl:space}

  \printbibliography
\end{document}

enter image description here


This is too long for a comment but picks up on your question about mutation. I've had to handle a similar effect in another language and did so via text composites. Specifically, pick an accent that you don't need for your article. Let's say the overdot \. will do.

You then define the bibliographic and to an a\. but add to the preamble of your document, for vowels:

\DeclareTextCompositeCommand{\.}{T1}{a}{c a}
\DeclareTextCompositeCommand{\.}{T1}{e}{c e}

for nonmutating consonants:

\DeclareTextCompositeCommand{\.}{T1}{m}{ m}
\DeclareTextCompositeCommand{\.}{T1}{f}{ f}

and, for mutating consonants:

\DeclareTextCompositeCommand{\.}{T1}{c}{ ch}
\DeclareTextCompositeCommand{\.}{T1}{t}{ th}

You should then find that and + a = ac a, that and + m = a m, and that and + c = a ch.

Two things that you may have to watch for in implementing this idea:

  1. Biblatex (or similar systems) may want to force a space after and. If this is a normal space, then latex may ignore it (\.c = \. c). Otherwise, maybe \ignorespaces might help (not sure though).

  2. From some of the code in moeve's answer, it looks biblatex may want to embed and in brackets (compare to references = {{Cyfeiriadau}{Cyfeiriadau}}). If a\. is so embedded, it may interfere with \. having its argument passed on (it may try to interpret the closing bracket } as its argument, which will lead to an error in compiling). If that's the case, you'll need someone clueyer than me to fix the problem.