# Language selection for \maketitle

I am writing a document in English but when I use \maketitle, it inserts the date in Czech (my mother language I normally use when writing other text documents).

I have set my IDE (TexWorks) to English but it does not work.

I use \usepackage[czech]{babel} improt because my Name is spelled with Czech diacritics. When I remove this import, I get the following exception:

! Package babel Error: You haven't loaded the option czech yet.

See the babel package documentation for explanation.
Type  H <return>  for immediate help.
...

l.4 \select@language{czech}


I do not use any other command that would require the Czech import in my document so I dont know where this exception come from...

These are all imports I use:

\usepackage{mathtools}
\usepackage[czech]{babel}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage{setspace}


Could you suggest whats wrong? Thank you for any tips!

-
This happens any time you remove a language after having run LaTeX on the document: the language choice is saved in the .aux file. Just ignore the error and go on; in the next run the error will not be raised. Alternatively, remove the .aux file for the first run after the change in loaded languages. –  egreg Apr 27 at 9:37

Perhaps this works, although I have no idea how czech diacritics are generated...

\documentclass{scrbook}
\usepackage{mathtools}
\usepackage[english,czech]{babel}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage{setspace}

\title{A very sophisticated document}%
\author{By Smajl}%
\date{\selectlanguage{english}\today}%
\begin{document}

\maketitle

\selectlanguage{english}% for the rest

\end{document}


-
Works like a charm, thanks! –  Smajl Apr 27 at 9:43
No, it doesn't work. The language for the document will be Czech, giving wrong hyphenation. You should add \selectlanguage{english}, which would be equivalent to not loading Czech at all. –  egreg Apr 27 at 10:03
@egreg: Agreed, I had \selectlanguage{english} in a previous version, but deleted it afterwards. –  Christian Hupfer Apr 27 at 12:14

There is no need to add support for the Czech language just to type a name. Diacritics will be understood and correctly set so long as you add \usepackage[T1]{fontenc}.

I found somebody who seems also interested in TeX and will use his name for the example (it has many diacritics, as you see, and one typical of the Czech language).

\documentclass[a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
% \usepackage[english]{babel} % not necessary

\begin{document}

\author{Michal Růžička}
\title{Some title}

\maketitle

This is the text.

\end{document}


-
I agree also with your solution, but what, if there are some parts of the file which require nevertheless native language settings? Although rare, it might happen. –  Christian Hupfer Apr 27 at 12:15
@ChristianHupfer \usepackage[czech,english]{babel} and \begin{otherlanguage*}{czech}<text in Czech>\end{otherlanguage*}, or another featured command of babel. –  egreg Apr 27 at 12:25