josephwright / translator

Easy translation of strings in LaTeX
Other
15 stars 11 forks source link

\translate does not translate #11

Closed paternal closed 5 years ago

paternal commented 5 years ago

Hello, and sorry if this is a dumb question.

I am trying to translate some words to French. Here is my minimal working example:

\documentclass[french]{article}

\usepackage[french]{babel}
\usepackage[french]{translator}

\begin{document}

\translate{author}
\translate{Monday}
\translate{January}

\end{document}

What I expect is to see the words "auteur Lundi Janvier" (French translations of "author Monday January"); what I get is the original English words: "author Monday January".

I am missing something?

I am using debian testing. I get the issue with latex, pdflatex and lualatex. I get the issue with the package installed by apt, and when I compile this example in this cloned repository.

Any idea?

-- Louis

$ pdflatex --version
pdfTeX 3.14159265-2.6-1.40.20 (TeX Live 2019/Debian)
kpathsea version 6.3.1
Copyright 2019 Han The Thanh (pdfTeX) et al.
There is NO warranty.  Redistribution of this software is
covered by the terms of both the pdfTeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the pdfTeX source.
Primary author of pdfTeX: Han The Thanh (pdfTeX) et al.
Compiled with libpng 1.6.37; using libpng 1.6.37
Compiled with zlib 1.2.11; using zlib 1.2.11
Compiled with xpdf version 4.01
josephwright commented 5 years ago

You need to specify which dictionaries to use

\documentclass[french]{article}

\usepackage{babel}
\usepackage{translator}
\usedictionary{translator-basic-dictionary}
\usedictionary{translator-months-dictionary}
\begin{document}

\translate{author}
\translate{Monday}
\translate{January}

\end{document}
paternal commented 5 years ago

Thanks! I did try this, but with the wrong dictionary name.