2

As the title says, I can't get translator to work with polyglossia. I noticed the problem when trying to use siunitx with localisation:

\documentclass{article}
\usepackage{polyglossia}
\usepackage{siunitx}
\setmainlanguage{swedish}
\setotherlanguage{english}

\begin{document}
\numlist{10;20;30}
\end{document}

The result is "10, 20 and 30" (the correct translation would be "10, 20 och 30"). I figured it was a problem with siunitx, however using translator directly doesn't work either:

\documentclass{article}
\usepackage{polyglossia}
\usepackage{translator}
\setmainlanguage{swedish}
\setotherlanguage{english}

\begin{document}
\translate{help}
\end{document}

The result is "help" while it should be "hjälp".

1 Answer 1

1

You need to tell translator which languages you are using as package options, for example \usepackage[swedish,english]{translator}. Moreover, the list of predefined translations is very small (see http://mirrors.ctan.org/macros/latex/contrib/translator/translator-basic-dictionary-Swedish.dict), and help is not in it. Therefore you need to define the translation for that word manually.

MWE:

\documentclass{article}
\usepackage{polyglossia}
\usepackage[swedish,english]{translator}
\deftranslation[to = Swedish]{help}{hjälp}
\usepackage{siunitx}
\setmainlanguage{swedish}
\setotherlanguage{english}

\begin{document}
\translate{help}

\numlist{10;20;30}
\end{document}

Result:

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .