diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/polyglossia/gloss-norwegian.ldf')
-rw-r--r-- | Master/texmf-dist/tex/latex/polyglossia/gloss-norwegian.ldf | 38 |
1 files changed, 21 insertions, 17 deletions
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-norwegian.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-norwegian.ldf index 544c8b7df79..ba7b7aca46d 100644 --- a/Master/texmf-dist/tex/latex/polyglossia/gloss-norwegian.ldf +++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-norwegian.ldf @@ -1,4 +1,4 @@ -% Language definition file (part of polyglossia v2.1 -- 2024/03/07) +% Language definition file (part of polyglossia v2.2 -- 2024/07/15) % \ProvidesFile{gloss-norwegian.ldf}[polyglossia: module for Norwegian] \PolyglossiaSetup{norwegian}{ @@ -20,28 +20,32 @@ \setlanguagealias[variant=nynorsk]{norwegian}{nynorsk} \def\norwegian@variant{nynorsk} -\define@choicekey*+{norwegian}{variant}[\xpg@val\xpg@nr]{nynorsk,bokmal}[nynorsk]{% - \ifcase\xpg@nr\relax - % nynorsk: - \def\norwegian@variant{nynorsk}% - \SetLanguageKeys{norwegian}{langtag=NYN,babelname=nynorsk,bcp47=nn,bcp47-language=nn}% - \xpg@fontsetup@latin{norwegian}% - \or - % bokmal: - \def\norwegian@variant{norsk}% - \SetLanguageKeys{norwegian}{langtag=NOR,babelname=norsk,bcp47=nb,bcp47-language=nb}% - \xpg@fontsetup@latin{norwegian}% - \fi - \xpg@info{Option: norwegian, variant=\xpg@val}% -}{\xpg@warning{Unknown norwegian variant `#1'}} +\DeclareKeys[polyglossia/gloss/norwegian] + { + variant.choice:, + variant / nynorsk.code = + {% + \def\norwegian@variant{nynorsk}% + \SetLanguageKeys{norwegian}{langtag=NYN,babelname=nynorsk,bcp47=nn,bcp47-language=nn}% + \SetupLatinPolyglossiaFont{norwegian}% + }, + variant / bokmal.code = + {% + \def\norwegian@variant{norsk}% + \SetLanguageKeys{norwegian}{langtag=NOR,babelname=norsk,bcp47=nb,bcp47-language=nb}% + \SetupLatinPolyglossiaFont{norwegian}% + }, + variant.default:n = nynorsk, + variant/unknown.code = \xpg@warning{Unknown norwegian variant `#1'} + } % Register default options -\xpg@initialize@gloss@options{norwegian}{variant=nynorsk} +\InitializeGlossOptions{norwegian}{variant=nynorsk} \def\norwegian@language{% - \polyglossia@setup@language@patterns{\norwegian@variant}% + \SetupPolyglossiaLangPatterns{\norwegian@variant}% }% \def\captionsnorwegian@nynorsk{% |