I have in the @thesis entries in my .bib file the names of institutions and types written in the local language of the thesis. I need to translate these to English. As an example, I need to translate institution names like
Universitetet i Oslo
Universitetet i Bergen
Høgskolen i Agder
to
University of Oslo
University of Bergen
Agder University College
and translate type names like
Hovedoppgave
Hovedfagsavhandling
Masteroppgave
to
Main subject thesis
Main subject thesis
MA thesis
Based on similar conversions I've done (Change US postal codes (CA) to AP stylebook abbreviations (Calif.) in bibliography (biblatex)), I have a vague idea what to do, but I don't know how to accurately implement it:
\DeclareSourcemap{
\maps[datatype = bibtex]{
\map{
\step[fieldsource = institution,
match = , % <- strings like "Universitetet i Oslo", "Universitetet i Bergen"
replace = ] % <- strings like "University of Oslo", "University of Bergen"
}
\map{
\step[fieldsource = type,
match = , % <- strings like "Hovedoppgave", "Masteroppgave"
replace = ] % <- strings like "Main subject thesis", "MA thesis"
}
}
}
EDIT
There seems to be a problem doing this when the string I need to replace contains non-ascii characters like æøå:
\documentclass{article}
\usepackage[style = authoryear-comp]{biblatex}
\usepackage{fontspec,filecontents}
\begin{filecontents}{\jobname.bib}
@THESIS{aasen2004,
AUTHOR = "Anita Aasen",
INSTITUTION = "Universitetet i Oslo",
TITLE = "Språklig nivellering i Oslo-regionen",
TYPE = "Hovedfagsoppgave i nordisk språk og litteratur",
YEAR = "2004",
SUBTITLE = "Ungdommers valg av språklige varianter i Follo"}
\end{filecontents}
\DeclareSourcemap{
\maps[datatype = bibtex]{
\map{
\step[fieldsource = type,
match = {Hovedfagsoppgave i nordisk språk og litteratur},
replace = {Main subject thesis}]
}
}
}
\addbibresource{\jobname.bib}
\begin{document}
\nocite{*}
\printbibliography
\end{document}

biblatexallows to do exactly that (not automatically though). Then you could useinstitution = {Universitetet i Oslo}, institution _translated_english = {University of Oslo},and choose whether the original or translated string is shown. I'm sure thebiblatexmaintainers are keen on beta testers, you can find a dev version on http://sourceforge.net/projects/biblatex/files/experimental/. – moewe Apr 28 '14 at 16:28