I'm confused about language names in the polyglossia package. Table 1 on page 5 of the polyglossia documentation lists the language names in lower case (e.g. 'korean', not 'Korean'). But when I try to use the lower case name 'korean' in a document, and run it with LuaLaTeX, I get an error. Here's the MWE:
\documentclass{article}
\usepackage{polyglossia}
\setmainlanguage{korean}
\setmainfont{UnBatang}
\begin{document}
한국
\end{document}
..and here's the error message (I've pretended it's code to make it stand out on stackexchange):
You cannot set field spec in a node of type glue.
\newpage ...k \@nobreakfalse \everypar {}\fi \par
\ifdim \prevdepth >\z@ \vs...
LuaLaTeX appears to work ok with the upper case name 'Korean'.
I don't get this kind of error with the other (3) lower case language names I've tried (russian, farsi and tamil).
Neither upper nor lower case names trigger an error message in XeLaTeX, although the upper case version does give me a rather odd message:
Package polyglossia Warning: No hyphenation patterns were loaded for `orean'
(polyglossia) I will use \language=\l@nohyphenation instead on input line 6.
--so something has apparently stripped off the upper case 'K'. I get no such message with the lower case 'korean'.
I suppose it's possible that LuaLaTeX is also stripping off the upper case 'K', and as a result polyglossia isn't doing something (like loading hyphenation patterns) that triggers an error in lualatex. In other words, it's possible that the apparent success with the uppercase 'Korean' in lualatex is due to something else that goes wrong.
Is polyglossia supposed to use lowercase or upper case language names?
If this is a bug in lualatex and/or polyglossia (and if language names in polyglossia are supposed to be lower case), is there a better way to work around it than supplying an upper case name for Korean?