% Language definition file (part of polyglossia v2.2 -- 2024/07/15) % \ProvidesFile{gloss-belarusian.ldf}[polyglossia: module for Belarusian] \RequirePackage{xpg-cyrillicnumbers} \PolyglossiaSetup{belarusian}{ bcp47=be, bcp47-language=be, bcp47-region=BY, bcp47-variant=1959acad, bcp47-script=Cyrl, script=Cyrillic, scripttag=cyrl, langtag=BEL, hyphennames={belarusian}, hyphenmins={2,2}, frenchspacing=true, fontsetup, localnumeral=belarusiannumerals, Localnumeral=Belarusiannumerals } % BCP-47 compliant aliases \setlanguagealias*[spelling=classic]{belarusian}{be-tarask} \setlanguagealias*{belarusian}{be} \def\belarusian@spelling{modern} \newif\ifcyrillic@numerals \newif\ifcyrillic@asbuk@numerals \DeclareKeys[polyglossia/gloss/belarusian] { babelshorthands.if = belarusian@babelshorthands, babelshorthands.default:n = true, spelling.choice:, spelling / modern.code = {% \def\belarusian@spelling{modern}% \SetLanguageKeys{belarusian}{bcp47=be,bcp47-variant=1959acad}% }, spelling / classic.code = {% \def\belarusian@spelling{tarask}% \SetLanguageKeys{belarusian}{bcp47=be-tarask,bcp47-variant=tarask}% }, spelling / tarask.code = {% \def\belarusian@spelling{tarask}% \SetLanguageKeys{belarusian}{bcp47=be-tarask,bcp47-variant=tarask}% }, spelling.default:n = modern, spelling/unknown.code = \xpg@warning{Unknown Belarusian spelling `#1'}, numerals.choice:, numerals / arabic.code = {% \cyrillic@numeralsfalse \cyrillic@asbuk@numeralsfalse }, numerals / cyrillic.code = {% \cyrillic@numeralstrue \cyrillic@asbuk@numeralsfalse }, numerals / cyrillic-trad.code = {% \cyrillic@numeralstrue \cyrillic@asbuk@numeralsfalse }, numerals / cyrillic-alph.code = {% \cyrillic@numeralstrue \cyrillic@asbuk@numeralstrue }, numerals.default:n = arabic, numerals/unknown.code = \xpg@warning{Unknown Belarusian numerals value `#1'} } % Register default options \InitializeGlossOptions{belarusian}{babelshorthands=false,numerals=arabic,spelling=modern} % Register alias options \SetLanguageAliasValues{belarusian}{spelling}{classic,tarask} \ifsystem@babelshorthands \SetGlossOptions{belarusian}{babelshorthands=true} \else \SetGlossOptions{belarusian}{babelshorthands=false} \fi \InitializeBabelShorthands \def\belarusian@shorthands{% \xpg@activate@shorthands% \def\language@group{belarusian}% \declare@shorthand{belarusian}{"`}{„}% \declare@shorthand{belarusian}{"'}{“}% \declare@shorthand{belarusian}{"<}{«}% \declare@shorthand{belarusian}{">}{»}% \declare@shorthand{belarusian}{""}{\hskip\z@skip}% \declare@shorthand{belarusian}{"~}{\textormath{\leavevmode\hbox{-}}{-}}% \declare@shorthand{belarusian}{"=}{\nobreak-\hskip\z@skip}% \declare@shorthand{belarusian}{"|}{\textormath{\nobreak\discretionary{-}{}{\kern.03em}\allowhyphens}{}}% \declare@shorthand{belarusian}{"-}{% \def\belarusian@sh@tmp{% \if\belarusian@sh@next-\expandafter\belarusian@sh@emdash% \else\expandafter\belarusian@sh@hyphen\fi% }% \futurelet\belarusian@sh@next\belarusian@sh@tmp% }% \def\belarusian@sh@hyphen{% \nobreak\-\bbl@allowhyphens}% \def\belarusian@sh@emdash##1##2{\cdash-##1##2}% \def\cdash##1##2##3{\def\tempx@{##3}% \def\tempa@{-}\def\tempb@{~}\def\tempc@{*}% \ifx\tempx@\tempa@\@Acdash\else \ifx\tempx@\tempb@\@Bcdash\else \ifx\tempx@\tempc@\@Ccdash\else \errmessage{Wrong usage of cdash}\fi\fi\fi}% \def\@Acdash{\ifdim\lastskip>\z@\unskip\nobreak\hskip.2em\fi \cyrdash\hskip.2em\ignorespaces}% \def\@Bcdash{\leavevmode\ifdim\lastskip>\z@\unskip\fi \nobreak\cyrdash\penalty\exhyphenpenalty\hskip\z@skip\ignorespaces}% \def\@Ccdash{\leavevmode \nobreak\cyrdash\nobreak\hskip.35em\ignorespaces}% \ifx\cyrdash\undefined \def\cyrdash{\hbox to.8em{\textendash\hss\textendash}}% \fi \declare@shorthand{belarusian}{",}{\nobreak\hskip.2em\ignorespaces}% } \def\nobelarusian@shorthands{% \xpg@deactivate@shorthands% } % Taken from babel-belarusian \def\captionsbelarusian@modern{% \def\prefacename{Прадмова}% \def\refname{Спіс літаратуры}% \def\abstractname{Анатацыя}% \def\bibname{Літаратура}% \def\chaptername{Глава}% \def\appendixname{Дадатак}% \def\contentsname{Змест}% \def\listfigurename{Спіс ілюстрацый}% \def\listtablename{Спіс табліц}% \def\indexname{Прадметны паказальнік}% \def\authorname{Паказальнік імён}% \def\figurename{Рыс.}% \def\tablename{Табліца}% \def\partname{Частка}% \def\enclname{укл.}% \def\ccname{зых.}% \def\headtoname{вх.}% \def\pagename{с.}% \def\seename{гл.}% \def\alsoname{гл.\ таксама}% \def\proofname{Доказ}% \def\glossaryname{Слоўнік тэрмінаў}% \def\acronymname{Абрэвіятуры}% \def\lstlistingname{Лістынг}% \def\lstlistlistingname{Лістынгі}% \def\notesname{Нататкі}% } \def\captionsbelarusian@tarask{% \def\prefacename{Прадмова}% \def\refname{Сьпіс літаратуры}% \def\abstractname{Анатацыя}% \def\bibname{Літаратура}% \def\chaptername{Глава}% \def\appendixname{Дадатак}% \def\contentsname{Зьмест}% \let\tocname=\contentsname \def\listfigurename{Сьпіс ілюстрацый}% \def\listtablename{Сьпіс табліц}% \def\indexname{Прадметны паказальнік}% \def\authorname{Паказальнік імён}% \def\figurename{Рыс.}% \def\tablename{Табліца}% \def\partname{Частка}% \def\enclname{укл.}% \def\ccname{зых.}% \def\headtoname{вх.}% \def\pagename{с.}% \def\seename{гл.}% \def\alsoname{гл.\ таксама}% \def\proofname{Доказ}% \def\glossaryname{Слоўнік тэрмінаў}% \def\acronymname{Абрэвіятуры}% \def\lstlistingname{Лістынг}% \def\lstlistlistingname{Лістынгі}% \def\nomname{Азначэньні}% \def\notesname{Нататкі}% } \def\captionsbelarusian{% \csuse{captionsbelarusian@\belarusian@spelling}% } \def\datebelarusian@modern{% \def\today{\number\day~\ifcase\month\or студзеня\or лютага\or сакавіка\or красавіка\or мая\or чэрвеня\or ліпеня\or жніўня\or верасня\or кастрычніка\or лістапада\or снежня\fi \space \number\year~г.}% } \def\datebelarusian@tarask{% \def\today{\number\day~\ifcase\month\or% студзеня\or лютага\or сакавіка\or красавіка\or траўня\or чэрвеня\or ліпеня\or жніўня\or верасьня\or кастрычніка\or лістапада\or сьнежня\fi% \space \number\year~г.}% } \def\datebelarusian{% \csuse{datebelarusian@\belarusian@spelling}% } % Use \providecommand here as the ldf file might % be reloaded via be-tarask (BCP). \providecommand{\belarusiannumerals}[2]{\belarusiannumber{#2}} \providecommand{\Belarusiannumerals}[2]{\Belarusiannumber{#2}} \def\belarusiannumber#1{% \ifcyrillic@numerals \ifcyrillic@asbuk@numerals \belarusian@asbuk@alph{#1}% \else \cyr@alph{#1}% \fi \else \number#1% \fi% } \def\Belarusiannumber#1{% \ifcyrillic@numerals \ifcyrillic@asbuk@numerals \belarusian@asbuk@Alph{#1}% \else \cyr@Alph{#1}% \fi \else \number#1% \fi% } \let\belarusiannumeral=\belarusiannumber \let\Belarusiannumeral=\Belarusiannumber \def\Asbuk#1{\expandafter\belarusian@asbuk@Alph\csname c@#1\endcsname} \def\asbuk#1{\expandafter\belarusian@asbuk@alph\csname c@#1\endcsname} \def\AsbukTrad#1{\expandafter\cyr@Alph\csname c@#1\endcsname} \def\asbukTrad#1{\expandafter\cyr@alph\csname c@#1\endcsname} % This is a poor man's cyrillic alphanumeric. It just uses the alphabet and % thus ends at 30. \def\belarusian@asbuk@Alph#1{\ifcase#1\or А\or Б\or В\or Г\or Д\or Е\or Ж\or З\or И\or К\or Л\or М\or Н\or О\or П\or Р\or С\or Т\or У\or Ф\or Х\or Ц\or Ч\or Ш\or Щ\or Э\or Ю\or Я% \else\xpg@ill@value{#1}{belarusian@asbuk@Alph}\fi% } \def\belarusian@asbuk@alph#1{\ifcase#1\or а\or б\or в\or г\or д\or е\or ж\or з\or и\or к\or л\or м\or н\or о\or п\or р\or с\or т\or у\or ф\or х\or ц\or ч\or ш\or щ\or э\or ю\or я% \else\xpg@ill@value{#1}{belarusian@asbuk@alph}\fi% } \def\belarusian@numbers{% \let\latin@alph\@alph \let\latin@Alph\@Alph \ifcyrillic@numerals% \def\belarusian@alph##1{\expandafter\belarusiannumeral\expandafter{\the##1}}% \def\belarusian@Alph##1{\expandafter\belarusiannumeral\expandafter{\the##1}}% \let\@alph\belarusian@alph% \let\@Alph\belarusian@Alph% \fi } \def\nobelarusian@numbers{% \let\@alph\latin@alph% \let\@Alph\latin@Alph% } \def\noextras@belarusian{% \ifcyrillic@numerals\nobelarusian@numbers\fi% \ifbelarusian@babelshorthands\nobelarusian@shorthands\fi% } \def\blockextras@belarusian{% \ifcyrillic@numerals\belarusian@numbers\else\nobelarusian@numbers\fi% \ifbelarusian@babelshorthands\belarusian@shorthands\else\nobelarusian@shorthands\fi% } \def\inlineextras@belarusian{% \ifbelarusian@babelshorthands\belarusian@shorthands\else\nobelarusian@shorthands\fi% } \endinput