Etam Etam - 4 months ago 17
LaTeX Question

Multilanguage document in Latex

how do you prepare Latex document with a translation... I need 1 multilanguage document. It should be something like:

\section{pl:Costam; en:Something}


Then I'd like to render it in Polish or English...

Answer

I have the solution!

\newboolean{eng}
\setboolean{eng}{false}
\newboolean{pol}
\setboolean{pol}{true}
\newboolean{rus}
\setboolean{rus}{false}

\newcommand{\lang}[3]
{
    \ifthenelse{\boolean{eng}}{#1}{}\ifthenelse{\boolean{pol}}{#2}{}\ifthenelse{\boolean{ger}}{#3}{}
}

Usage:

\lang{English}{Polski}{Deutch}