# LuaLaTeX and polyglossia 1.47

When I use Hebrew with polyglossia 1.47 and LuaLaTeX on TeXLive 2019, I get an error message that I don't get with polyglossia 1.46. Here is my MWE:

%!TEX TS-program = lualatex
%!TEX encoding = UTF-8 Unicode

\documentclass{article}
\usepackage{fontspec}
\newfontfamily\hebrewfont{SBL Hebrew}[Script=Hebrew]
\usepackage{polyglossia}
\setdefaultlanguage[variant=us]{english}
\setotherlanguage{hebrew}

\begin{document}
Text in English and \texthebrew{עברית}. Text...
\end{document}


The messages I get

Package polyglossia Warning: Hebrew is not supported with LuaTeX.
(polyglossia)                I will proceed with the compilation, but
(polyglossia)                the output is not guaranteed to be correct
(polyglossia)                and may look very wrong. on input line 6.

(/usr/local/texlive/2019/texmf-dist/tex/lualatex/luabidi/luabidi.sty
(/usr/local/texlive/2019/texmf-dist/tex/lualatex/luabidi/luabidi-footnotes.def)
) (/usr/local/texlive/2019/texmf-dist/tex/latex/polyglossia/hebrewcal.sty
(/usr/local/texlive/2019/texmf-dist/tex/latex/polyglossia/cal-util.def))
Setting \if@calendar@hebrew
(/usr/local/texlive/2019/texmf-dist/tex/latex/polyglossia/babel-hebrewalph.def)

! Too many }'s.
l.120   \fi}
%
! Extra \fi.
l.121 \fi

• Make a bug report. You can also try babel's new bidi/hebrew support. Polyglossia seems not to support hebrew with lualatex anyway. – Ulrike Fischer Feb 7 at 7:12
• This looks like a bug in gloss-hebrew.ldf (\if.....\if-matching). Report it at github.com/reutenauer/polyglossia/issues – moewe Feb 7 at 7:15
• the code uses an \if that is not defined. A work around is \makeatletter\newif\if@nonlatin\makeatother before loading the language. – Ulrike Fischer Feb 7 at 8:27
• Thank you for the suggestion (I reported it as a possible bug) and for the workaround. – Gildas Hamel Feb 7 at 19:24
• I wonder, though, why this \if is accessed at all with lualatex, as the definition is in \ifxetex – JSpitzm Feb 8 at 7:41