For example, the German collection \type{collection-langgerman} contains packages \type{hyphen-german} and \type{dehyph-exptl} which both contain hyphenation patterns (in addition to many other packages related to German language). The Greek collection \type{collection-langgreek} contains \type{hyphen-greek} and \type{hyphen-ancientgreek} among other packages. The package \type{dehyph-exptl} is maintained independently, while all packages \type{hyphen-}{\tt\sl<foo>} belong to \type{hyph-utf8}.
Hyphenation packages may contain one or more patterns. For example \type{hyphen-norwegian} contains two directives for adding two hyphenation patterns:
\starttyping
execute AddHyphen \
name=bokmal synonyms=norwegian,norsk \
lefthyphenmin=2 \
righthyphenmin=2 \
file=loadhyph-nb.tex \
file_patterns=hyph-nb.pat.txt \
file_exceptions=hyph-nb.hyp.txt
execute AddHyphen \
name=nynorsk \
lefthyphenmin=2 \
righthyphenmin=2 \
file=loadhyph-nn.tex \
file_patterns=hyph-nn.pat.txt \
file_exceptions=hyph-nn.hyp.txt
\stoptyping
The keywords {\bf name} and {\bf synonyms} are used as language name to access the patterns in \TeX, {\bf file} is used as pattern loader for 8-bit engines and \XeTeX, while {\bf file\_patterns} and {\bf file\_exceptions} are plain text files used by \LuaTeX.
The information from \type{AddHyphen} directives end up in three different files: \type{language.dat} used by \LaTeX, \type{language.def} used by plain \eTeX\ and \type{language.dat.lua} used by \LuaTeX.
All the three are placed in\crlf
\strut\type{ $TEXMFSYSVAR/tex/generic/config},\crlf
for example in\crlf
\strut\type{ /usr/local/texlive/2017/texmf-var/tex/generic/config},\crlf
while a static copy also exists in\crlf
\strut\type{ $TEXMFDIST/tex/generic/config},\crlf
but that one contains all languages and only makes sense if you have a complete checkout from SVN repository for example.
\placefigure[force]{\type{language.dat.lua} (the keyword \type{loader} is not used anywhere at the moment)}{
\starttyping
-- from hyphen-norwegian:
['bokmal'] = {
loader = 'loadhyph-nb.tex',
lefthyphenmin = 2,
righthyphenmin = 2,
synonyms = { 'norwegian', 'norsk' },
patterns = 'hyph-nb.pat.txt',
hyphenation = 'hyph-nb.hyp.txt',
},
['nynorsk'] = {
loader = 'loadhyph-nn.tex',
lefthyphenmin = 2,
righthyphenmin = 2,
synonyms = { },
patterns = 'hyph-nn.pat.txt',
hyphenation = 'hyph-nn.hyp.txt',
},
\stoptyping
}
The files \type{language.dat} and \type{language.def} are used both by 8-bit and native Unicode engines. On one hand this simplifies things, while on the other it makes very little sense to include sanskrit patterns in \pdfTeX\ -- the package doesn't load any patterns in that case any way. It might be that there will be multiple copies of \type{language.dat} for different engines in future.
\subsection{\MiKTeX}
In \MiKTeX\ application {\bf MiKTeX Options} which you can run from Start menu ({\em Maintenance} $\rightarrow$ {\em Settings} or {\em Maintenance (Admin)} $\rightarrow$ {\em Settings (Admin)\/}) or from command line (\type{mo.exe} or \type{mo_admin.exe}) you can select which languages you want to include into \TeX\ formats.
\placefigure[force]{user interface to select the desired languages}{\externalfigure[img/MiKTeX-languages.png]}%[width=7cm]
Based on that selection \MiKTeX\ creates three files \type{language.dat}, \type{language.def} and \type{language.dat.lua} in directory
\starttyping
C:\ProgramData\MiKTeX\2.9\tex\generic\config
\stoptyping
The contents of those files are the same as described in \TeXLive\ section, but the needed information about names of languages and required files comes from
\starttyping
C:\Program Files\MiKTeX 2.9\MiKTeX\config\languages.ini
\stoptyping
instead of special \type{hyphen-}{\tt\sl<foo>} packages.
(Exact location might depend on where you install \MiKTeX\ and whether you install it for all users or just for yourself. It may also depend on Windows version. The information above holds for \MiKTeX\ 2.9 on Windows 7 with system-wide installation.)