I think this works:
\makeatletter
\AtEveryCitekey{%
\blx@langsetup\abx@field@hyphenation%
\blx@hyphenreset%
}
\makeatother
In \abx@field@hyphenation
is hyphenation value. Probably it needs some testing, if it is set.
edit:
Some time ago, I was looking at biblatex language switching because of problem with my citation style[1]. I didn't understand this code at all, so I ended with ugly hack[2].
But when I looked yesterday on biblatex's patch of babel you posted, I have found line
\blx@langsetup\languagename\select@language
Function \blx@langsetup
uses edef
to define \blx@languagename
, which is used by macro \blx@hyphenreset
to load hyphenation patterns, and then loads localization strings for given language. So in fact, instead of
\blx@langsetup\abx@field@hyphenation%
it is possible to use just
\edef\blx@languagename{\abx@field@hyphenation}%
Then there is problem with French language. When used as the main document language, instead of
... (Fis-
el 1985)...
there is
...(FISCHEL
1985)...
I think there is issue only with French, I tried Czech, Russian and Spanish and they worked correctly.
With babel
, we can solve this issue with
\select@language\abx@field@hyphenation%
but, polyglossia
in xelatex has same issue and this trick is there not working, I don't know how to fix that.
Anyway, if you don't need French with polyglossia
, this is the current solution
\makeatletter
\AtEveryCitekey{%
\ifcsdef{abx@field@hyphenation}{%
\edef\blx@languagename{\abx@field@hyphenation}%
\select@language\abx@field@hyphenation%
\blx@hyphenreset%
}{}%
}
\makeatother
[1] Biblatex - using two languages in one reference entry
[2] Biblatex - using two languages in one reference entry
\documentclass{article}
\usepackage[ngerman,english]{babel}
\useshorthands{"}
\addto\extrasenglish{\languageshorthands{ngerman}}
\begin{document}
\minipage{1cm}\hrulefill
\hspace{0pt}zoning-facilitated
\hspace{0pt}zoning"=facil"-itated
\endminipage
\end{document}

With lualatex
you do not need the \hspace{0pt}
(LuaTeX hyphenates the first word of a paragraph, which TeX doesn't)
Best Answer
You may have to install spanish language support for TeX on your operating system. For instance, on Debian or Ubuntu it means to install
texlive-lang-spanish
I guess.Afterwards it may be necessary to rebuilt the format files, for instance by
at the command prompt or the package manager of your TeX distribution.
I suggest you add some information to your question regarding operating system and TeX distribution.
However, this topic in the UK TeX FAQ may help you: Using a new language with Babel. It deals with this warning message and shows ways how to fix that.