I've used hyphenrules to add custom hyphenation to the languages I write in. I once asked how to do this, and the accepted answer (MWE below) no longer compiles, but gives the error message Environment hyphenrules undefined.
So the question is, how should one add language specific custom hyphenation rules with polyglossia now? I'm using version 1.49 of polyglossia.
\documentclass{article}
\usepackage{polyglossia}
\setmainlanguage{nynorsk}
\begin{hyphenrules}{nynorsk}
\hyphenation{fram-halds-skulen}
\end{hyphenrules}
\begin{document}
\parbox{0pt}{\hspace{0pt}framhaldsskulen}
\end{document}
EDIT
Following Ulrike's comment, I've tried to follow section 5.1 in the polyglossia documentation, where it says we can use the command \xpghyphenation. Doing so, however, only gives me the error message Undefined control sequence. l.6 \xpghyphenation.
\documentclass{article}
\usepackage{polyglossia}
\setmainlanguage{nynorsk}
\xpghyphenation{nynorsk}{fram-halds-skulen}
\begin{document}
\parbox{0pt}{\hspace{0pt}framhaldsskulen}
\end{document}


\xpghyphenation. I've tried, but only get the errorUndefined control sequence. l.6 \xpghyphenation. – Sverre Jun 24 '20 at 18:05\xpghyphenationis a typo, see https://github.com/reutenauer/polyglossia/issues/413. It has for some reason still not been corrected in the documentation. – Sverre Jun 24 '20 at 18:15hyphenruleswas not to give hyphenation exceptions in the preamble, it is to use only the hyphenation patterns of the specified language) – moewe Jun 24 '20 at 19:19