Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

What's the difference in babel package, between :

\selectlanguage{languageA}

and

\begin{otherlanguage}{languageB}
Text in language B.
\end{otherlanguage}

?

I'd like to write two langauge document, where I will have whole chapters in one or another language, each in separated included file.

Which Method of language switching is more appropriate in my case?

share|improve this question
3  
I would use \selectlanguage. The environment creates a group which is probably unnessary. –  Ulrike Fischer Nov 29 '11 at 15:38

2 Answers 2

up vote 6 down vote accepted

The question is if you also want to change the date format and e.g. the chapter headings, when you have chapters. If yes, then use \selectlanguage. If you want to keep the date format and chapter headers like "Chapter", then use the environment otherlanguage* or for a short text the command \foreignlanguage.

share|improve this answer
    
+1 for : "The question is if you also want to change the date format and eg the chapter headings, if pyou have chapters. If yes, then use \selectlanguage." - this part is crucial in my case :). –  Grzegorz Wierzowiecki Nov 29 '11 at 18:55

The \selectlanguage command and the otherlanguage environment have the same functionality: change all language-related settings; the difference is that the environment defines a group so the language change is local to the environment.

In your case, since the changes must apply to whole chapters, I'd probably go with \selectlanguage, unless intermixing left-to-right typesetting with right-to-left typesetting is required, in which case the environment would be better according to babel documentation:

The environment otherlanguage does basically the same as \selectlanguage, except the language change is local to the environment. This environment is required for intermixing left-to-right typesetting with right-to-left typesetting.

There's also an otherlanguage* environment in which the typesetting is done according to the rules of the other language, but the text-strings such as "figure", "table", etc. are left as they were set outside this environment.

share|improve this answer
    
a lot of useful information :). –  Grzegorz Wierzowiecki Nov 29 '11 at 18:55

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.