For Babel, you have the command \selectlanguage
that does exactly that. Obviously, you need such a thing to switch language inside a document body, because it wouldn't make sense to select all the languages at the same time! As you probably know, the convention in Babel is that the last language in the list of option is activated at \begin{document}
; hence a command like \usepackage[french,russian]{babel}
will declare the document to be in Russian by default, and use the settings of russian.ldf
.
Generally speaking, any package you use should provide such switches because that's exactly what you need, as a user. If the functionality of the package implies that you can switch between different options, the developer has probably foreseen such use, and it should be mentioned in the documentation.
But you can't load a package mid-document (\usepackage
forbids that). This is a technical limitation that has its justification from the point of view of an interface designer. It is a guarantee to both the user and the developer: if someone writes a package for LaTeX, he knows that it will be loaded before \begin{document}
, and hence before any text will be output to the page; this means he will be able to make implementation choices depending on this (that might fail if this condition wasn't true). If you were, as a user, to modify \usepackage
's behaviour so that it could be invoked after the preamble—it shouldn't be too hard, by tweaking the LaTeX sources—, and you used that new possibility, you could unknowingly be in a situation that hasn't been foreseen at all by the developer, because it's impossible given the way LaTeX is currently written (and this is a design choice, not a technical problem). Hence you, the user, depend on the user interface the package developer has programmed for you; just like the package developer depends on the programming interface the LaTeX core provides.
Of course, loading a package mid-document (with or without different switches) could be completely harmless in many cases, but this is not something you can rely on; the only guarantee the user has are the switches the package developer has provided himself.
Sorry I can't think of any concrete example right now.