%%
%% The LaTeX Companion, 3ed
%%
%% Example 13-2-4 on page II-304 in "Setting or getting the current language".
%%
%% Copyright (C) 2022 Frank Mittelbach
%%
%% It may be distributed and/or modified under the conditions
%% of the LaTeX Project Public License, either version 1.3c
%% of this license or (at your option) any later version.
%%
%% See https://www.latex-project.org/lppl.txt for details.
%%

\documentclass{tlc3exa}
\pagestyle{empty}
\setcounter{page}{6}
\setlength\textwidth{111.0pt}

  \setlength\parindent{0pt}

%StartShownPreambleCommands
\usepackage[german,french,english]{babel}
%StopShownPreambleCommands

\begin{document}
\par(1) The language is \languagename.
\par(2) \selectlanguage{german} The language is \languagename.
\par(3) \begin{otherlanguage}{french}
           The language is \languagename.  \end{otherlanguage}
\par(4) \foreignlanguage{english}{The language is \languagename.}
\par(5) \iflanguage{french}{En français.}{Pas en français.}
\par(6) The language is \languagename.
\end{document}
