Hyphenation can be disabled in different ways. One is to set
that assign "infinite" cost to discretionary and explicit hyphens respectively.
Another way is to choose a language with no hyphenation patterns, which is more efficient, because it spares TeX from computing demerits.
All modern TeX distributions have already such a language in their predefined set, and it's called
nohyphenation. If you're using
will allow line breaking only at explicit hyphens. If you want to disable also them, then setting
\exhyphenpenalty=10000 is still necessary. However, one has to cope with paragraph setting, allowing larger interword spaces without too many
Underfull \hbox messages, which is obtained by saying
A "complete" solution might be to define a
nohyphens environment so that one can type
Text not to be hyphenated
in the following way
babel is loaded we use its features, otherwise we simply set the current language to the "no hyphenation" one, if existent; in the worst case we set the language number to 255, which shouldn't be defined (TeX formats usually assign progressive numbers to the enabled languages and having 256 of them is highly unlikely).
Note that assigning
\language=-1 is not a solution: the TeXbook says, at p. 455,
\language is negative or greater than 255, TeX acts as if
\language = 0