1

url's in my bibliography are printed like m/d/y but I want it to be printed as d/m/y. How can I force biblatex to do that?

MWE:

\documentclass{report}
\usepackage{polyglossia}
\setdefaultlanguage[variant=british]{english}
\usepackage[backend=biber,maxbibnames=99,urldate=short,sortlocale=danish,firstinits=true,style=authoryear-icomp,dashed=false,doi=false,isbn=false,url=true,]{biblatex}
jbahn
  • 443
  • 2
    That's not an MWE, it is not complete and so can't be used for a test. Complete it with e.g. entries from biblatex-examples.bib. – Ulrike Fischer Dec 30 '17 at 11:28
  • @UlrikeFischer: Thanks for your comment. I believe that what you are referring to is an MWEB (including bibliographic examples), which you are right that I did not provide. Would that be an advantage here? – jbahn Dec 30 '17 at 11:40
  • 1
    Well I almost always test my solutions, and if there is not document to test them in the question either I have to spent my time to build one or I have to ignore the question. – Ulrike Fischer Dec 30 '17 at 11:48
  • 1
    @jbahn: Does this answer help you https://tex.stackexchange.com/a/269653/134144 ? – leandriis Dec 30 '17 at 12:03

1 Answers1

3

biblatex can't automatically detect the language variant with polyglossia.

You need to add

\DeclareLanguageMapping{english}{UKenglish}

to your preamble.

David Purton
  • 25,884
  • Adding this to the preamble still yields the url date in mm/dd/yyyy format while OP requested dd/mm/yyyy format. According to this answer (https://tex.stackexchange.com/a/129209/134144), the australian language might be a solution although it has some drawbacks. So maybe the solution presented in this answer (https://tex.stackexchange.com/a/269653/134144) might be better. – leandriis Dec 30 '17 at 13:31
  • @leandriis, you're right! I would have thought that british should be the same as australian. I'll change my answer. There should be no side effects in using australian rather than british. – David Purton Dec 30 '17 at 13:39
  • @leandriis, actually I think there is a bug somewhere. british gives mm/dd/yyyy, but UKenglish gives dd/mm/yyyy. Given that UKenglish simply inherits from british without changing anything, they should be identical. – David Purton Dec 30 '17 at 13:48
  • When I add <\DeclareLanguageMapping{english}{UKenglish}> to my preamble I get this error: Undefined control sequence. \DeclareLanguageMapping – jbahn Dec 30 '17 at 14:04
  • @DavidPurton That's indeed interesting and seems to be reproducible using different versions of biblatex. – leandriis Dec 30 '17 at 14:05
  • Does i matter where in preamble I add <\DeclareLanguageMapping{english}{UKenglish}>? – jbahn Dec 30 '17 at 14:08
  • BTW, I also have <\setotherlanguage{danish}> after <\setdefaultlanguage[variant=british]{english> in my preamble. Could that interfere? – jbahn Dec 30 '17 at 14:09
  • \DeclareLanguageMapping must come after \usepackage{biblatex} – David Purton Dec 30 '17 at 14:14
  • 1
    I submitted a bug report to biblatex: https://github.com/plk/biblatex/issues/677 – David Purton Dec 30 '17 at 14:15
  • 1
    polyglossia variants doesn't work well in biblatex as a sensible interface is missing. See e.g. https://tex.stackexchange.com/questions/324849/how-do-we-get-polyglossia-language-variants-to-work-with-biblatex-bibliographies, https://github.com/plk/biblatex/issues/460 and https://github.com/reutenauer/polyglossia/issues/154. I would avoid polyglossia here if possible and use babel instead. \DeclareLanguageMapping is not meant for variants (see the biblatex docu). – Ulrike Fischer Dec 30 '17 at 16:36